Skip to content

Commit

Permalink
Rust connpool: hook up metrics (#7681)
Browse files Browse the repository at this point in the history
This is the last part of the connpool work which brings the work up to
parity with the previous connpool. Note we may need to make some
additional tweaks for QoS in the future, as the metrics are somewhat
sensitive to overall timing. I don't think this means our pool is
malfunctioning in any way, just that both the Rust and Python pools are
very sensitive to the order of incoming connections.

There are two failing tests that were disabled, as they have coverage in
the new pool code. One test behaves differently in the new pool by
design.

Some refactoring took place in this PR to clean up dependencies and the
knob optimizer itself.
  • Loading branch information
mmastrac authored Sep 3, 2024
1 parent a1a87b0 commit 61dad7d
Show file tree
Hide file tree
Showing 15 changed files with 1,411 additions and 1,038 deletions.
47 changes: 36 additions & 11 deletions Cargo.lock

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

22 changes: 17 additions & 5 deletions edb/server/conn_pool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ workspace = true

[features]
python_extension = ["pyo3/extension-module"]
optimizer = []
optimizer = ["genetic_algorithm", "lru", "rand", "statrs", "anyhow", "tokio/test-util"]

[dependencies]
pyo3 = { workspace = true, optional = true }
Expand All @@ -25,6 +25,15 @@ tracing-subscriber = "0"
strum = { version = "0.26", features = ["derive"] }
consume_on_drop = "0"
smart-default = "0"
serde = { version = "1", features = ["derive"] }
serde-pickle = "1"

# For the optimizer
genetic_algorithm = { version = "0.9.0", optional = true }
lru = { version = "0.12.4", optional = true }
rand = { version = "0.8.5", optional = true }
statrs = { version = "0.17.1", optional = true }
anyhow = { version = "1", optional = true }

[dependencies.derive_more]
version = "1.0.0-beta.6"
Expand All @@ -37,12 +46,15 @@ pretty_assertions = "1.2.0"
test-log = { version = "0", features = ["trace"] }
anyhow = "1"
rstest = "0"
rand = "0"
statrs = "0"
genetic_algorithm = "0.7.2"
lru = "0"

statrs = "0.17.1"
rand = "0.8.5"

[lib]
crate-type = ["lib", "cdylib"]
name = "conn_pool"
path = "src/lib.rs"

[[bin]]
name = "optimizer"
required-features = ["optimizer"]
Loading

0 comments on commit 61dad7d

Please sign in to comment.