-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-27474 Evict blocks on split/merge; Avoid caching reference/hlinks if compaction is enabled #4868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-27474 Evict blocks on split/merge; Avoid caching reference/hlinks if compaction is enabled #4868
Changes from 3 commits
f24615d
4ee9264
525137f
0367419
e690557
32114b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,8 @@ | |
| */ | ||
| package org.apache.hadoop.hbase.regionserver.handler; | ||
|
|
||
| import static org.apache.hadoop.hbase.regionserver.CompactSplit.HBASE_REGION_SERVER_ENABLE_COMPACTION; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.concurrent.atomic.AtomicBoolean; | ||
| import org.apache.hadoop.hbase.HConstants; | ||
|
|
@@ -27,6 +29,7 @@ | |
| import org.apache.hadoop.hbase.executor.EventType; | ||
| import org.apache.hadoop.hbase.procedure2.Procedure; | ||
| import org.apache.hadoop.hbase.regionserver.HRegion; | ||
| import org.apache.hadoop.hbase.regionserver.HRegionServer; | ||
| import org.apache.hadoop.hbase.regionserver.RegionServerServices; | ||
| import org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext; | ||
| import org.apache.hadoop.hbase.regionserver.RegionServerServices.RegionStateTransitionContext; | ||
|
|
@@ -277,6 +280,10 @@ Throwable getException() { | |
| /** Returns Instance of HRegion if successful open else null. */ | ||
| private HRegion openRegion() { | ||
| HRegion region = null; | ||
| boolean compactionEnabled = | ||
| ((HRegionServer) server).getCompactSplitThread().isCompactionsEnabled(); | ||
| this.server.getConfiguration().setBoolean(HBASE_REGION_SERVER_ENABLE_COMPACTION, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why change the global configuration here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want to prefetch blocks for links/refs only if compaction is disabled, but the prefetch happens in the HFileReader, where we don't access to the CompactSplitThread, so saving the state of compaction switch in the config for HFileReader deciding if prefetch should go ahead. |
||
| compactionEnabled); | ||
| try { | ||
| // Instantiate the region. This also periodically tickles OPENING | ||
| // state so master doesn't timeout this region in transition. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.