dataroaring opened a new pull request, #61233: URL: https://github.com/apache/doris/pull/61233
## Summary - 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` ## Motivation 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 ## Test plan - [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) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
