feat(search): use stable node IDs for split affinity to keep disk cache warm when searcher pods restart - #6711
Open
congx4 wants to merge 2 commits into
Open
Conversation
Rendezvous hashing previously keyed off gRPC addresses, so a searcher restart that kept QW_NODE_ID but changed listen address remapped every split. Hash the cluster node ID instead, while keeping the searcher pool keyed by address for RPC.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 057b3f7124
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The helper no longer stores a socket address; rendezvous hashing uses node_id only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is independent of the split-range disk cache stack. It is useful for cache locality after a same-node restart, but it does not require that cache.
Summary
report_splits) now hashes the clusternode_id/QW_NODE_IDinstead of the gRPCSocketAddr.node_iddocs note that searchers should keep this ID stable (for example a StatefulSet pod name) if the same splits should keep landing on the same node.What this does not fix
QW_NODE_IDis a random Deployment hostname, affinity is still unstable. The default remains the short hostname.node_idis unchanged.put_kv/get_kvshare this ranking. While old and new coordinators coexist, an in-flight scroll can miss a live replica (possible at 8+ searchers). Homogeneous fleet and replica restarts are unchanged from today; MiniKV is still in-memory.Test plan
cargo test -p quickwit-search --all-features --libcargo test -p quickwit-serve --all-features --lib -- setup_searcher datafusion_workercargo test -p quickwit-janitor --all-features --libcargo test -p quickwit-datafusion --all-featurescargo clippy -p quickwit-search -p quickwit-serve -p quickwit-datafusion --all-features --tests -- -D warningsQW_NODE_IDand a changed gRPC port keeps the same split assignment