infraio commented on a change in pull request #2392:
URL: https://github.com/apache/hbase/pull/2392#discussion_r491278644
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/MetaLocationCache.java
##########
@@ -102,34 +111,43 @@
master.getConfiguration().getInt(SYNC_INTERVAL_SECONDS,
DEFAULT_SYNC_INTERVAL_SECONDS);
int fetchTimeoutMs =
master.getConfiguration().getInt(FETCH_TIMEOUT_MS,
DEFAULT_FETCH_TIMEOUT_MS);
- master.getChoreService().scheduleChore(new ScheduledChore(
- getClass().getSimpleName() + "-Sync-Chore", this, syncIntervalSeconds,
0, TimeUnit.SECONDS) {
+ refreshChore = new ScheduledChore(getClass().getSimpleName() +
"-Sync-Chore", this,
+ syncIntervalSeconds, 0, TimeUnit.SECONDS) {
@Override
protected void chore() {
AsyncClusterConnection conn = master.getAsyncClusterConnection();
if (conn != null) {
- addListener(conn.getAllMetaRegionLocations(fetchTimeoutMs), (locs,
error) -> {
+ final CacheHolder ch = holder.get();
+ long lastSyncSeqId = ch != null ? ch.lastSyncSeqId :
HConstants.NO_SEQNUM;
+ addListener(conn.syncRoot(lastSyncSeqId, fetchTimeoutMs), (resp,
error) -> {
Review comment:
What is the key thing of this jira? Just refactor
getAllMetaRegionLocations to syncRoot? And I thought maybe need a better name
for understand.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]