Repository navigation
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
|
Workflow [PR], commit [7a7fb1a] Summary: ❌
AI ReviewSummaryThis PR adds PR Metadata
Findings
Tests
Final Verdict
LLVM Coverage ReportMeasured on commit 7a7fb1a.
Changed lines: Changed C/C++ lines covered: 99/117 (84.62%) · Uncovered code |
Add the `keeper_server.per_server_coordination_settings` section, which
contains `<server-N>` elements where `N` is a server id, with settings
that override `coordination_settings` on the server with that id. This
keeps the config identical on all servers while letting some settings
differ, e.g. to migrate a cluster to `use_lsmt_storage` one server at a
time:
<per_server_coordination_settings>
<server-1>
<use_lsmt_storage>true</use_lsmt_storage>
</server-1>
</per_server_coordination_settings>
The id is part of the element name so that the config merger pairs the
elements per server across config files, the same way disks in
`storage_configuration` are merged. (Repeated same-named elements are
paired positionally by the merger, so a layout with repeated `<server>`
elements and an `<id>` child would merge two files each holding a
`<server>` for a different server into one element, overwriting the id.
A bare number is not a valid XML element name, hence the prefix.)
Overrides are applied wherever coordination settings are loaded from the
config, including hot reload, so hot-reloadable settings can be
overridden per server too. Setting names are validated for every server
so a typo is reported everywhere; values are parsed only for this
server. Element names that don't match `server-N` exactly and the same
`server-N` listed twice in one file are rejected.
`KeeperTCPHandler` now takes the session timeout bounds from
`KeeperContext` instead of reading `coordination_settings` from the
config tree, so it sees the overrides; the config getter parameter of
`KeeperTCPHandlerFactory` is no longer needed. The co-located ZooKeeper
client (`ZooKeeperArgs::initFromKeeperServerSection`) also honours the
per-server overrides for the settings it mirrors.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
7a7fb1a to
a41fd1d
Compare
| /// `coordination_settings` (see `CoordinationSettings::loadFromConfig`). | ||
| std::string per_server_elem; | ||
| if (auto server_id_key = std::string{config_name} + ".server_id"; config.has(server_id_key)) | ||
| per_server_elem = std::string{config_name} + ".per_server_coordination_settings.server-" + config.getString(server_id_key); |
There was a problem hiding this comment.
The server side canonicalizes keeper_server.server_id through getInt, but the colocated client rebuilds the override key from the raw XML text here. With a config like <server_id>01</server_id> plus <per_server_coordination_settings><server-1>...</server-1></per_server_coordination_settings>, KeeperDispatcher applies the server-1 overrides while ZooKeeperArgs looks for server-01 and silently falls back to the base settings. That breaks the PR's contract that the embedded ZooKeeper client sees the same effective session_timeout_ms / operation_timeout_ms / max_request_size / use_xid_64 as the server. Please parse server_id numerically here and format it canonically (or share the same helper as CoordinationSettings::loadFromConfig), and add a regression test for a non-canonical server_id spelling.
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes10 object files changed (+33.48 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units52 translation units recompiled, 326 s compile time in total, 52 of them have a recent master baseline. |
|
(Not actually ready for review, I just want a CI build.) |
|
📊 Cloud Performance Report ✅ AI verdict: This PR changes how Keeper loads its coordination settings: it adds per-server overrides and makes the Keeper TCP handler read session timeouts from the loaded settings. It does not touch query execution, so no ClickBench or TPC-H query runs the changed code. Q16 (+14.9%) and Q18 (+16.1%) are downgraded to not sure. Q32 (+22.8%) stays suppressed because it falls within master's normal variance band. All three are high-cardinality GROUP BY queries whose CPU time rose together, and both ClickBench source runs shared a host, which points to host contention rather than the diff. None of these results needs action from the author. clickbenchFlagged queries (3 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
|
(The code is probably fine, but idk if this feature is needed.) |
Add the
keeper_server.per_server_coordination_settingssection, which contains<server-N>elements whereNis a server id, with settings that overridecoordination_settingson the server with that id. This keeps the config identical on all servers while letting some settings differ, e.g. to migrate a cluster touse_lsmt_storageone server at a time:The id is part of the element name so that the config merger pairs the elements per server across config files, the same way disks in
storage_configurationare merged. (Repeated same-named elements are paired positionally by the merger, so a layout with repeated<server>elements and an<id>child would merge two files each holding a<server>for a different server into one element, overwriting the id. A bare number is not a valid XML element name, hence the prefix.)Overrides are applied wherever coordination settings are loaded from the config, including hot reload, so hot-reloadable settings can be overridden per server too. Setting names are validated for every server so a typo is reported everywhere; values are parsed only for this server. Element names that don't match
server-Nexactly and the sameserver-Nlisted twice in one file are rejected.KeeperTCPHandlernow takes the session timeout bounds fromKeeperContextinstead of readingcoordination_settingsfrom the config tree, so it sees the overrides; the config getter parameter ofKeeperTCPHandlerFactoryis no longer needed. The co-located ZooKeeper client (ZooKeeperArgs::initFromKeeperServerSection) also honours the per-server overrides for the settings it mirrors.Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/122124]