Skip to content

branch-4.1: [opt](memory) Remove unused indexId field from CloudReplica #62080#62097

Open
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-62080-branch-4.1
Open

branch-4.1: [opt](memory) Remove unused indexId field from CloudReplica #62080#62097
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-62080-branch-4.1

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 3, 2026

Cherry-picked from #62080

## Summary
- Remove the `indexId` field and its `@SerializedName` from
`CloudReplica`, saving 8 bytes per replica object
- The only external usage is debug logging in `CloudTabletStatMgr` which
already uses `stat.getIdx().getIndexId()` from the proto response — no
change needed
- Constructor parameter is kept for source compatibility but the value
is no longer stored
- Gson silently ignores unknown keys when deserializing old images, so
backward compatibility is maintained

## Memory Impact
-8 bytes/replica. At 10M replicas: ~76 MB saved. At 100M replicas: ~763
MB saved.

## Test plan
- [ ] Existing cloud tests pass (`mvn test -pl fe/fe-core
-Dtest="*Cloud*"`)
- [ ] Gson backward compatibility: old-format JSON with "indexId" key
deserializes without errors (silently ignored)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot requested a review from yiguolei as a code owner April 3, 2026 07:55
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring closed this Apr 3, 2026
@dataroaring dataroaring reopened this Apr 3, 2026
@hello-stephen
Copy link
Copy Markdown
Contributor

run buildall

2 similar comments
@mymeiyi
Copy link
Copy Markdown
Contributor

mymeiyi commented May 28, 2026

run buildall

@mymeiyi
Copy link
Copy Markdown
Contributor

mymeiyi commented May 29, 2026

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants