Skip to content

Commit

Permalink
HBASE-26833 Avoid waiting to clear buffer usage of ReplicationSourceS…
Browse files Browse the repository at this point in the history
…hipper when aborting the RS (#4218)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
  • Loading branch information
sunhelly committed Mar 15, 2022
1 parent 31cb0b8 commit 89754dd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,9 +704,11 @@ public void terminate(String reason, Exception cause, boolean clearMetrics,
worker.entryReader.interrupt();
}
}
//If worker is already stopped but there was still entries batched,
//we need to clear buffer used for non processed entries
worker.clearWALEntryBatch();
if (!server.isAborted() && !server.isStopped()) {
//If server is running and worker is already stopped but there was still entries batched,
//we need to clear buffer used for non processed entries
worker.clearWALEntryBatch();
}
}

if (join) {
Expand Down

0 comments on commit 89754dd

Please sign in to comment.