HBASE-25506 ServerManager#startChore affects MTTR of HMaster (#2889)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Bo Cui 2021-01-28 22:55:05 +08:00 committed by GitHub
parent b07549febb
commit 4aff481318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -921,8 +921,13 @@ public class ServerManager {
public void startChore() {
Configuration c = master.getConfiguration();
if (persistFlushedSequenceId) {
// when reach here, RegionStates should loaded, firstly, we call remove deleted regions
removeDeletedRegionFromLoadedFlushedSequenceIds();
new Thread(() -> {
// after AM#loadMeta, RegionStates should be loaded, and some regions are
// deleted by drop/split/merge during removeDeletedRegionFromLoadedFlushedSequenceIds,
// but these deleted regions are not added back to RegionStates,
// so we can safely remove deleted regions.
removeDeletedRegionFromLoadedFlushedSequenceIds();
}, "RemoveDeletedRegionSyncThread").start();
int flushPeriod = c.getInt(FLUSHEDSEQUENCEID_FLUSHER_INTERVAL,
FLUSHEDSEQUENCEID_FLUSHER_INTERVAL_DEFAULT);
flushedSeqIdFlusher = new FlushedSequenceIdFlusher(