Skip to content

Commit a202b3f

Browse files
authored
Client side routing implementation (#205)
* Basic implementation of client side routing: - Use round-robin balancing - Store routing table in a Dashmap to allow fast concurrency - Perform the update of the routing table using a simple mutex on the TTL of the table itself - read/write mode is propagated into the RUN command - Bolt scheme in pools to allow direct connections with no routing to provided servers * Address most of the comments * Remove Default implementation for Database structure * Remove debug message * - Use Instant for creation time in the connection registry - Lock the creation_time * Remove call to ok() * Use compare for versions >= 4.4 * Renaming Normal -> Direct * Remove run_read since it is essentially useless * Formatting * Remove zeroes in supported versions
1 parent 4a4f0f0 commit a202b3f

23 files changed

+1434
-215
lines changed

ci/Cargo.lock.min

Lines changed: 102 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/Cargo.lock.msrv

Lines changed: 61 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ unstable-bolt-protocol-impl-v2 = [
3131
backoff = { version = "0.4.0", features = ["tokio"] }
3232
bytes = { version = "1.5.0", features = ["serde"] }
3333
chrono-tz = "0.10.0"
34+
dashmap = "6.1.0"
3435
delegate = "0.13.0"
3536
futures = { version = "0.3.0" }
3637
log = "0.4.0"

lib/src/bolt/request/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mod hello;
66
mod pull;
77
mod reset;
88
mod rollback;
9+
mod route;
910

1011
pub use commit::Commit;
1112
pub use discard::Discard;

0 commit comments

Comments
 (0)