HBASE-26833 Avoid waiting to clear buffer usage of ReplicationSourceShipper when aborting the RS (#4218)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
Xiaolin Ha 2022-03-15 22:04:40 +08:00 committed by GitHub
parent fb09cb9e7b
commit d050217a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -693,9 +693,11 @@ public class ReplicationSource implements ReplicationSourceInterface {
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) {