Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treewide: Upgrade tokio to 1.32 #422

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 34 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ postgres-native-tls = { git = "https://github.com/readysettech/rust-postgres.gi
postgres-protocol = { git = "https://github.com/readysettech/rust-postgres.git"}
postgres-types = { git = "https://github.com/readysettech/rust-postgres.git"}
tokio-postgres = { git = "https://github.com/readysettech/rust-postgres.git"}
tokio = { version = "1.28", features = ["full"] }
tokio = { version = "1.32", features = ["full"] }
rocksdb = { git = "https://github.com/readysettech/rust-rocksdb.git", default-features = false, features = ["lz4"] }

[profile.release]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{:hooks
{:analyze-call
{next.jdbc/with-transaction
hooks.com.github.seancorfield.next-jdbc/with-transaction}}
:lint-as {next.jdbc/on-connection clojure.core/with-open}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
(ns hooks.com.github.seancorfield.next-jdbc
(:require [clj-kondo.hooks-api :as api]))

(defn with-transaction
"Expands (with-transaction [tx expr opts] body)
to (let [tx expr] opts body) per clj-kondo examples."
[{:keys [:node]}]
(let [[binding-vec & body] (rest (:children node))
[sym val opts] (:children binding-vec)]
(when-not (and sym val)
(throw (ex-info "No sym and val provided" {})))
(let [new-node (api/list-node
(list*
(api/token-node 'let)
(api/vector-node [sym val])
opts
body))]
{:node new-node})))
4 changes: 4 additions & 0 deletions jepsen/.clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{:lint-as {dom-top.core/with-retry clojure.core/let}
:linters
{:unresolved-symbol
{:exclude [e retry]}}}
1 change: 1 addition & 0 deletions jepsen/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/.prepl-port
/.cpcache
/store
/.clj-kondo/.cache
1 change: 1 addition & 0 deletions jepsen/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[com.github.seancorfield/next.jdbc "1.3.883"]
[org.postgresql/postgresql "42.6.0"]
[slingshot "0.12.2"]]
:plugins [[com.github.clj-kondo/lein-clj-kondo "0.2.5"]]
:repl-options {:init-ns jepsen.readyset}
:main jepsen.readyset
:resource-paths ["resources"])
3 changes: 1 addition & 2 deletions jepsen/src/jepsen/consul/db.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"Adapted from https://github.com/jepsen-io/jepsen/blob/main/consul/src/jepsen/consul/db.clj"
(:require [clojure.tools.logging :refer [info]]
[jepsen.consul.client :as client]
[jepsen.core :as jepsen]
[jepsen.db :as db]
[jepsen.control :as c]
[jepsen.control.net :as net]
Expand Down Expand Up @@ -41,7 +40,7 @@
"Install and cleanup a specific version of consul"
[version]
(reify db/DB
(setup! [_ test node]
(setup! [_ _test node]
(info node "installing consul" version)
(c/su
(let [url (str "https://releases.hashicorp.com/consul/"
Expand Down
12 changes: 5 additions & 7 deletions jepsen/src/jepsen/readyset/client.clj
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
(ns jepsen.readyset.client
"Utilities for interacting with a ReadySet cluster"
(:require
[clojure.java.io :as io]
[clojure.set :as set]
[clojure.tools.logging :refer [info warn]]
[dom-top.core :refer [with-retry]]
[jepsen.client :as client]
[jepsen.readyset.nodes :as nodes]
[knossos.model :as model]
[next.jdbc :as jdbc]
[slingshot.slingshot :refer [throw+ try+]])
(:import
Expand Down Expand Up @@ -107,10 +105,10 @@

(defrecord Client [conn table-created? tables]
client/Client
(open! [this test node]
(open! [this test _node]
(assoc this :conn (test-datasource test)))

(setup! [this test]
(setup! [_this _test]
(when (compare-and-set! table-created? false true)
(jdbc/execute! conn ["drop table if exists t1;"])
(jdbc/execute! conn ["create table t1 (x int)"])
Expand All @@ -124,7 +122,7 @@
(throw+ {:error :retry-attempts-exceeded
:exception e}))))))

(invoke! [_ test op]
(invoke! [_ _test op]
(try+
(case (:f op)
(:read :final-read)
Expand All @@ -141,13 +139,13 @@
(catch PSQLException e
(assoc op :type :fail :message (ex-message e)))))

(teardown! [this test]
(teardown! [_this _test]
(try
(some-> conn (jdbc/execute! ["drop table if exists t1;"]))
(catch PSQLException e
(warn "Could not drop table:" e))))

(close! [this test]
(close! [this _test]
(dissoc this :conn)))

(defn new-client []
Expand Down
7 changes: 0 additions & 7 deletions jepsen/test/readyset/jepsen_test.clj

This file was deleted.

2 changes: 1 addition & 1 deletion proptest-stateful/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ edition = "2021"
async-trait = "0.1"
proptest = "1.0.0"
rand = "0.8.5"
tokio = { version = "1.28", features = ["full"] }
tokio = { version = "1.32", features = ["full"] }

2 changes: 0 additions & 2 deletions readyset-server/src/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ impl Handle {
.unwrap()
.send(HandleRequest::QueryReadiness(tx))
.await
.ok()
.expect("Controller dropped, failed, or panicked");

if rx.await.unwrap() {
Expand Down Expand Up @@ -104,7 +103,6 @@ impl Handle {
done_tx: fin_tx,
})
.await
.ok()
.expect("Controller dropped, failed, or panicked");

fin_rx.await.unwrap().unwrap();
Expand Down