saintstack commented on a change in pull request #980: HBASE-23205 Correctly 
update the position of WALs currently being replicated
URL: https://github.com/apache/hbase/pull/980#discussion_r363591365
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
 ##########
 @@ -478,8 +495,8 @@ public String getStats() {
     for (Map.Entry<String, ReplicationSourceShipperThread> entry : 
workerThreads.entrySet()) {
       String walGroupId = entry.getKey();
       ReplicationSourceShipperThread worker = entry.getValue();
-      long position = worker.getCurrentPosition();
-      Path currentPath = worker.getCurrentPath();
+      long position = worker.getLastLoggedPosition();
+      Path currentPath = worker.getLastLoggedPath();
 
 Review comment:
   This is not for test, right? We iterate the workers twice -- once to get 
path and then again to get position. Don't want to return a Pair with Path and 
offset so just iterate once?

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


With regards,
Apache Git Services

Reply via email to