Uh oh!
There was an error while loading. Please reload this page.
[improvement](cloud) Use rendezvous hashing for colocate tablet placement (#64638) - #66066
Merged
yiguolei merged 2 commits intoJul 31, 2026
Merged
Conversation
hello-stephen
commented
Jul 26, 2026
Contributor
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
deardeng
commented
Jul 26, 2026
ContributorAuthor
run buildall |
…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.
deardengforce-pushed
the
codex/pick-64638-to-branch-4.1
branch
from
July 30, 2026 04:16
cd32bf5 to
3744c56Comparedeardeng
commented
Jul 30, 2026
ContributorAuthor
run buildall |
hello-stephen
commented
Jul 30, 2026
Contributor
FE UT Coverage ReportIncrement line coverage |
hello-stephen
commented
Jul 30, 2026
Contributor
FE Regression Coverage ReportIncrement line coverage |
yiguolei
approved these changes
Jul 31, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
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)