Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.4.10
-
None
-
Reviewed
Description
HBASE-24813 introduced the clear of buffer used in replication source shipper, but there is sleep in the method, if the variable sleepForRetries has a large value, and there are many wal groups, the aborting of RS may last a long time, but we should only do some necessary things in the aborting progress.
void clearWALEntryBatch() { long timeout = System.currentTimeMillis() + this.shipEditsTimeout; while(this.isAlive() || this.entryReader.isAlive()){ try { if (System.currentTimeMillis() >= timeout) { LOG.warn("Shipper clearWALEntryBatch method timed out whilst waiting reader/shipper " + "thread to stop. Not cleaning buffer usage. Shipper alive: {}; Reader alive: {}", this.source.getPeerId(), this.isAlive(), this.entryReader.isAlive()); return; } else { // Wait both shipper and reader threads to stop Thread.sleep(this.sleepForRetries); } } catch (InterruptedException e) { LOG.warn("{} Interrupted while waiting {} to stop on clearWALEntryBatch. " + "Not cleaning buffer usage: {}", this.source.getPeerId(), this.getName(), e); return; } } ......
Attachments
Issue Links
- links to