[improvement](cloud) Use rendezvous hashing for colocate tablet placement (#64638)#66067
Open
deardeng wants to merge 1 commit into
Open
[improvement](cloud) Use rendezvous hashing for colocate tablet placement (#64638)#66067deardeng wants to merge 1 commit into
deardeng wants to merge 1 commit into
Conversation
…ment (apache#64638) In cloud mode, colocate tablet-to-BE placement used modulo hashing ((murmur3(grpId) + idx) % availableBeNum), so scaling a compute group up or down remapped almost all buckets and caused large cold-cache query jitter for colocate tables. Replace it with rendezvous (HRW) hashing behind a new enable_cloud_colocate_consistent_hash (default true): each bucket picks the BE with the highest score(grpId, idx, beId). This keeps the colocate invariant (the same bucket index of all member tables lands on the same BE) while moving only ~1/N buckets when a single BE is added or removed. The legacy modulo path is kept as a rollback branch. Placement is memoized per (group, compute group) in CloudSystemInfoService with a lock-free cache hit and an order-independent fingerprint of the available BE set for invalidation. The cache is local-only (no editlog, no image), and the dead-BE grace window keeps its existing semantics. Add unit tests (movement ratio vs modulo, tie-break, cache invalidation, order independence, modulo rollback) and a cloud docker regression case for colocate join correctness. (cherry picked from commit 355ede4)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
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.
pick from #64638
In cloud mode, colocate tablet-to-BE placement used modulo hashing ((murmur3(grpId) + idx) % availableBeNum), so scaling a compute group up or down remapped almost all buckets and caused large cold-cache query jitter for colocate tables.
Replace it with rendezvous (HRW) hashing behind a new enable_cloud_colocate_consistent_hash (default true): each bucket picks the BE with the highest score(grpId, idx, beId). This keeps the colocate invariant (the same bucket index of all member tables lands on the same BE) while moving only ~1/N buckets when a single BE is added or removed. The legacy modulo path is kept as a rollback branch.
Placement is memoized per (group, compute group) in CloudSystemInfoService with a lock-free cache hit and an order-independent fingerprint of the available BE set for invalidation. The cache is local-only (no editlog, no image), and the dead-BE grace window keeps its existing semantics.
Add unit tests (movement ratio vs modulo, tie-break, cache invalidation, order independence, modulo rollback) and a cloud docker regression case for colocate join correctness.
(cherry picked from commit 355ede4)
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)