2005hithlj commented on code in PR #4966:
URL: https://github.com/apache/hbase/pull/4966#discussion_r1100069154


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/master/replication/AssignReplicationQueuesProcedure.java:
##########
@@ -130,18 +133,51 @@ private Flow claimQueues(MasterProcedureEnv env) throws 
ReplicationException {
     return Flow.HAS_MORE_STATE;
   }
 
+  // check whether ReplicationSyncUp has already done the work for us, if so, 
we should skip
+  // claiming the replication queues and deleting them instead.
+  private boolean shouldSkip(MasterProcedureEnv env) throws IOException {
+    MasterFileSystem mfs = env.getMasterFileSystem();
+    Path syncUpDir = new Path(mfs.getRootDir(), ReplicationSyncUp.INFO_DIR);
+    return mfs.getFileSystem().exists(new Path(syncUpDir, 
crashedServer.getServerName()));
+  }
+
+  private void removeQueues(MasterProcedureEnv env) throws 
ReplicationException, IOException {
+    ReplicationQueueStorage storage = 
env.getReplicationPeerManager().getQueueStorage();
+    for (ReplicationQueueId queueId : storage.listAllQueueIds(crashedServer)) {
+      storage.removeQueue(queueId);

Review Comment:
   Only the queue related info is deleted here. 
   Whether other info in the replication table also needs to be deleted?



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to