wchevreuil commented on a change in pull request #2191:
URL: https://github.com/apache/hbase/pull/2191#discussion_r470681579
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java
##########
@@ -650,6 +650,10 @@ public void terminate(String reason, Exception cause,
boolean clearMetrics, bool
if (worker.entryReader.isAlive()) {
worker.entryReader.interrupt();
}
+ } else {
+ //If worker is already stopped but there was still entries batched,
+ //we need to clear buffer used for non processed entries
+ worker.clearWALEntryBatch();
Review comment:
We don't want to clear entry batch if shipper thread is still running,
because it may race for the bufferUsage update. However, I realised we need to
go through the branch first to interrupt it, got confused by an additional loop
calling `stopWorker` prior to this one. I'm fixing this on a following commit.
----------------------------------------------------------------
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]