sandeepvinayak commented on a change in pull request #2960:
URL: https://github.com/apache/hbase/pull/2960#discussion_r579406108



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
##########
@@ -792,9 +795,13 @@ protected void shipEdits(WALEntryBatch entryBatch) {
     }
 
     private void updateLogPosition(long lastReadPosition) {
-      manager.logPositionAndCleanOldLogs(lastLoggedPath, peerClusterZnode, 
lastReadPosition,
-        this.replicationQueueInfo.isQueueRecovered(), false);
-      lastLoggedPosition = lastReadPosition;
+      try {
+        manager.logPositionAndCleanOldLogs(lastLoggedPath, peerClusterZnode, 
lastReadPosition,
+          this.replicationQueueInfo.isQueueRecovered(), false);
+        lastLoggedPosition = lastReadPosition;
+      } catch (ReplicationSourceWithoutPeerException re) {
+        source.terminate("Replication peer is removed and source should 
terminate", re);

Review comment:
       thanks @shahrs87 , I am taking a look again if this can be improved. 




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


Reply via email to