ddupg commented on a change in pull request #2249:
URL: https://github.com/apache/hbase/pull/2249#discussion_r473031667



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSourceManager.java
##########
@@ -516,7 +516,7 @@ public void refreshSources(String peerId) throws 
IOException {
         ReplicationSourceInterface replicationSource = createSource(queueId, 
peer);
         this.oldsources.add(replicationSource);
         for (SortedSet<String> walsByGroup : 
walsByIdRecoveredQueues.get(queueId).values()) {
-          walsByGroup.forEach(wal -> src.enqueueLog(new Path(wal)));
+          walsByGroup.forEach(wal -> replicationSource.enqueueLog(new 
Path(wal)));

Review comment:
       Thank @wchevreuil @infraio for reviewing. In this case, it will loss 
data and duplicate data at the same time.
   
   After we added these log to normal source, the normal source replicate the 
first WAL entries batch and updateLogPosition via zk.
   
   It will successfully replicate first WAL entries batch, but data may be 
out-of date. And then failed to [updateLogPosition in 
zk](https://github.com/apache/hbase/blob/1164531d5ab519ab58af82ba3849f8fcded3453f/hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/ZKReplicationQueueStorage.java#L233),
 which aborting RS, so we will also loss data.




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