Skip to content

PHOENIX-8085 UngroupedAggregateRegionObserver keeps full configuration copies for each region - #2717

Merged
apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8085
Dec 5, 2026
Merged

apurtell merged 1 commit into
apache:masterfrom
apurtell:PHOENIX-8085

Conversation

@apurtell

@apurtell apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

HBase creates one instance of this region observer for each open region. Its start method keeps three full copies of the region configuration and one more read-only copy. These copies use region server heap for each open region, for the life of the region. One of them has no readers.

The change keeps only a reference to the environment configuration. The compaction path and the index write failure path now make their own copy when they run. Behavior change: these paths now see an online configuration update. The cost is one copy per compaction and per failed index write batch. An error during a copy now fails that operation, not the coprocessor start.

🤖 Generated with Claude Code

…n copies for each region

Each open region has an UngroupedAggregateRegionObserver instance.
Its start method made three full copies of the region configuration.
It also made a property map of the index write copy.
One copy has no reader.
The coprocessor now keeps only a reference to the environment configuration.
Compaction and index write failure handling make their copy when they run.
Thus these paths now see an online configuration update, as the other readers do.
This removes about 1 MB of heap for each open region.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the change reducing retained per-region configuration copies.

No open issues 🎉

What changed in this PR

Reduces per-region heap usage by avoiding retained configuration copies in UngroupedAggregateRegionObserver.

Changes:

  • Retains the environment configuration reference and removes unused upsert-select configuration.
  • Creates configuration copies on demand for compaction and failed index writes, allowing these paths to see online updates.
File Description
phoenix-core-server/​src/​main/​java/​org/​apache/​phoenix/​coprocessor/​UngroupedAggregateRegionObserver.java Replaces retained configuration copies with operation-local copies.

Review effort: Balanced

@apurtell

apurtell commented Dec 4, 2026

Copy link
Copy Markdown
Contributor Author

Precommit note: the failures in this run are not related to this change. Each one is a known problem on master.

(Claude Code)

@apurtell
apurtell merged commit 3c751c0 into apache:master Dec 5, 2026
11 of 13 checks passed
@apurtell
apurtell deleted the PHOENIX-8085 branch December 5, 2026 07:02
asf-gitbox-commits pushed a commit that referenced this pull request Dec 5, 2026
…n copies for each region (#2717)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andrew Purtell <apurtell@salesforce.com>
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.

2 participants