branch-4.1: [refactor](cloud) Replace Tablet references with tabletId in CloudTabletRebalancer (#61233)#63844
Merged
Conversation
…letRebalancer (apache#61233) - Replace all `Set<Tablet>` data structures with `Set<Long>` (tabletId) in `CloudTabletRebalancer` - When tablet metadata (tableId, partitionId, indexId, dbId) is needed, look it up via `TabletInvertedIndex.getTabletMeta(tabletId)` instead of holding Tablet object references - When the actual `CloudReplica` is needed (e.g., in `updateClusterToBeMap`, `migrateTablets`), navigate through the catalog hierarchy: db → table → partition → index → tablet - Update `InfightTask.pickedTablet` and `WarmupTabletTask.pickedTablet` fields from `Tablet` to `long pickedTabletId` - Update `isConflict()` and conflict-check helpers to use `TabletMeta` instead of `CloudReplica` Storing `Tablet` objects in long-lived `ConcurrentHashMap` structures creates strong references that: 1. Prevent GC of dropped/replaced tablets, inflating heap usage 2. Risk serving stale tablet state after schema changes or drops 3. Hold unnecessarily large object graphs when only the tablet ID is needed for set membership and counting - [x] Updated `CloudTabletRebalancerTest` to use `Set<Long>` and `Long` instead of mocked `Tablet` objects - [ ] Verify FE compiles successfully - [ ] Run cloud tablet rebalancer regression tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
Contributor
Author
|
run buildall |
Contributor
FE Regression Coverage ReportIncrement line coverage |
Contributor
Author
|
run nonConcurrent |
Contributor
FE Regression Coverage ReportIncrement line coverage |
yiguolei
approved these changes
May 29, 2026
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 #61233