HBASE-30246 MOB compaction does not close MobCell after resolving ref…#8425
Open
liuxiaocs7 wants to merge 1 commit into
Open
HBASE-30246 MOB compaction does not close MobCell after resolving ref…#8425liuxiaocs7 wants to merge 1 commit into
liuxiaocs7 wants to merge 1 commit into
Conversation
…erence cells (apache#8422) Signed-off-by: Peng Lu <lupeng@apache.org> (cherry picked from commit 8667763) (cherry picked from commit 5ba181e)
There was a problem hiding this comment.
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#resolveMobCellto resolve a MOB reference, deep-copy the resolvedCell, and close the underlyingMobCell. - Update compaction paths (and the faulty compactor test helper) to use
resolveMobCellinstead of directly using the scanner-backed resolved cell. - Strengthen tests to enforce
MobCellclosure and independence of the returnedCell, and update existing resolve test to closeMobCellvia 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…erence cells (#8422)
(cherry picked from commit 8667763)
(cherry picked from commit 5ba181e)