Skip to content

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

Open
liuxiaocs7 wants to merge 1 commit into
apache:branch-2.6from
liuxiaocs7:HBASE-30246-branch-2.6
Open

HBASE-30246 MOB compaction does not close MobCell after resolving ref…#8425
liuxiaocs7 wants to merge 1 commit into
apache:branch-2.6from
liuxiaocs7:HBASE-30246-branch-2.6

Conversation

@liuxiaocs7

Copy link
Copy Markdown
Member

…erence cells (#8422)

(cherry picked from commit 8667763)
(cherry picked from commit 5ba181e)

…erence cells (apache#8422)

Signed-off-by: Peng Lu <lupeng@apache.org>
(cherry picked from commit 8667763)
(cherry picked from commit 5ba181e)
@liuxiaocs7 liuxiaocs7 requested a review from Copilot June 27, 2026 17:20
@liuxiaocs7 liuxiaocs7 added the backport This PR is a back port of some issue or issues already committed to master label Jun 27, 2026

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

Fixes MOB compaction/resolve lifecycle handling by ensuring MobCell instances are properly closed after resolving reference cells, while also returning an independent heap copy of the resolved cell to avoid later use-after-release of scanner-backed buffers during compaction.

Changes:

  • Add DefaultMobStoreCompactor#resolveMobCell to resolve a MOB reference, deep-copy the resolved Cell, and close the underlying MobCell.
  • Update compaction paths (and the faulty compactor test helper) to use resolveMobCell instead of directly using the scanner-backed resolved cell.
  • Strengthen tests to enforce MobCell closure and independence of the returned Cell, and update existing resolve test to close MobCell via try-with-resources.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java Introduces resolveMobCell to close MobCell and return a heap-resident copy safe for compaction writer retention.
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java Switches reference-cell resolution to resolveMobCell to match corrected ownership/closure behavior.
hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestDefaultMobStoreCompactor.java Adds a unit test verifying resolveMobCell closes the MobCell and returns an independent copy.
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHMobStore.java Updates testResolve to close returned MobCell instances using try-with-resources.

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

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

Labels

backport This PR is a back port of some issue or issues already committed to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants