Uh oh!
There was an error while loading. Please reload this page.
[fix](fe) modify tablet and replica to reduce memory - #59759
Conversation
hello-stephen
commented
Jan 12, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
There was a problem hiding this comment.
Pull request overview
This PR refactors the Tablet and Replica class hierarchy to reduce memory usage by removing unnecessary inheritance and implementing lazy initialization. The main optimization is removing MetaObject inheritance from Tablet, which eliminates unused fields for CloudTablet instances.
Changes:
- Removed
MetaObjectinheritance fromTabletclass and movedlastCheckTimefield toLocalTabletwhere it's actually used - Changed
Replicafields fromLongwrapper to primitivelongtypes to reduce memory overhead - Implemented lazy initialization for
CloudReplica.memClusterToBackendsmap to avoid allocating memory when not needed
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| ConsistencyChecker.java | Added type-specific TABLET_COMPARATOR to replace generic MetaObject comparator, improving type safety |
| CloudReplica.java | Changed memClusterToBackends to use lazy initialization with double-checked locking pattern and made hashReplicaToBes private |
| Tablet.java | Removed MetaObject inheritance and added default implementations for getLastCheckTime/setLastCheckTime methods |
| Replica.java | Changed localInvertedIndexSize and localSegmentSize from Long to long primitives |
| LocalTablet.java | Added lastCheckTime field and overridden methods to maintain consistency checking functionality for local tablets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
mymeiyi
commented
Jan 12, 2026
run buildall |
doris-robot
commented
Jan 12, 2026
TPC-H: Total hot run time: 32195 ms |
doris-robot
commented
Jan 12, 2026
TPC-DS: Total hot run time: 174085 ms |
hello-stephen
commented
Jan 12, 2026
FE UT Coverage ReportIncrement line coverage |
mymeiyi
commented
Jan 12, 2026
run cloud_p0 |
hello-stephen
commented
Jan 12, 2026
FE Regression Coverage ReportIncrement line coverage |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
Uh oh!
There was an error while loading. Please reload this page.
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)