HBASE-30177 Make block caching configurable for MOB compaction reads#8276
HBASE-30177 Make block caching configurable for MOB compaction reads#8276liuxiaocs7 wants to merge 3 commits into
Conversation
liuxiaocs7
commented
May 27, 2026
- see: HBASE-30177
There was a problem hiding this comment.
Pull request overview
This PR (HBASE-30177) introduces a configuration knob to control whether MOB compaction reads should populate the block cache when resolving MOB references, allowing operators to avoid block-cache pollution from background compactions while preserving existing behavior by default.
Changes:
- Added
hbase.mob.compaction.cache.blocksconfig (defaulttrue) and documented it inhbase-default.xml. - Plumbed the config into
DefaultMobStoreCompactor(and the test-onlyFaultyMobStoreCompactor) by passing it toHMobStore.resolve(...)instead of always caching. - Added a small unit test validating the default and override behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| hbase-server/src/main/java/org/apache/hadoop/hbase/mob/DefaultMobStoreCompactor.java | Reads new config and uses it when resolving MOB references during compaction. |
| hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobConstants.java | Adds the new config key constant and default value. |
| hbase-common/src/main/resources/hbase-default.xml | Documents the new hbase.mob.compaction.cache.blocks property and its default. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/mob/TestDefaultMobStoreCompactor.java | Adds unit tests for default true and configurable false. |
| hbase-server/src/test/java/org/apache/hadoop/hbase/mob/FaultyMobStoreCompactor.java | Ensures the test-only compactor respects the new caching config when resolving MOB refs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
VladRodionov
left a comment
There was a problem hiding this comment.
Thanks for the patch. The change looks good to me. The new config is useful, and keeping the default as true preserves the existing behavior.
Minor: the current test verifies that the compactor reads the configuration value, which is probably enough for this change since the production code simply passes that field into mobStore.resolve(...). No blocker from my side.
| </description> | ||
| </property> | ||
| <property> | ||
| <name>hbase.mob.compaction.cache.blocks</name> |
There was a problem hiding this comment.
Minor naming/documentation question: the config name hbase.mob.compaction.cache.blocks is understandable, but the behavior is specifically about caching blocks while reading existing MOB files during compaction, not cache-on-write of compaction output. To avoid confusion with cache-on-write settings, would a more explicit name such as hbase.mob.compaction.read.cache.blocks or hbase.mob.compaction.cache.blocks.on.read be clearer?