Skip to content

HBASE-30246 MOB compaction does not close MobCell after resolving ref…#8392

Merged
liuxiaocs7 merged 2 commits into
apache:masterfrom
liuxiaocs7:HBASE-30246
Jun 26, 2026
Merged

HBASE-30246 MOB compaction does not close MobCell after resolving ref…#8392
liuxiaocs7 merged 2 commits into
apache:masterfrom
liuxiaocs7:HBASE-30246

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

…erence cells

@liuxiaocs7 liuxiaocs7 requested a review from Copilot June 22, 2026 07:21

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.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR addresses HBASE-30246 by ensuring MOB reference resolution during compaction properly closes the MobCell and returns a safe, heap-resident copy of the resolved cell to avoid leaking scanners/buffers and referencing recycled NIO buffers.

Changes:

  • Introduce DefaultMobStoreCompactor#resolveMobCell(...) that closes MobCell and returns an independent copied ExtendedCell.
  • Update compaction paths to use resolveMobCell(...) instead of directly using mobStore.resolve(...).getCell().
  • Strengthen tests to use try-with-resources for MobCell and add a unit test verifying close + copy semantics.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java Adds resolveMobCell helper to close resolved MobCell and copy resolved cells safely; compaction updated to use it.
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java Aligns test compactor implementation with new resolveMobCell behavior.
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestDefaultMobStoreCompactor.java Adds unit test verifying resolveMobCell closes MobCell and returns an independent copy.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHMobStore.java Updates resolve test to close MobCell via try-with-resources and dereference via getCell().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@liuxiaocs7

Copy link
Copy Markdown
Member Author

Thanks @guluo2016 for reviewing!

@liuxiaocs7 liuxiaocs7 merged commit 8667763 into apache:master Jun 26, 2026
8 checks passed
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