HBASE-25887 Wait for appendExecutor to shutdown running tasks (#3264)
Co-authored-by: Rushabh <rushabh.shah@salesforce.com> Signed-off-by: Viraj Jasani <vjasani@apache.org> Signed-off-by: Bharath Vissapragada <bharathv@apache.org>
This commit is contained in:
parent
c0ee153c90
commit
130d6a1f15
|
@ -1098,6 +1098,9 @@ public class FSHLog implements WAL {
|
|||
@Override
|
||||
public void shutdown() throws IOException {
|
||||
if (shutdown.compareAndSet(false, true)) {
|
||||
// Close FSHlog instance before shutting down disruptor. This will make sure we will not
|
||||
// add more entries to ring buffer (via append) while we disruptor#shutdown is in progress.
|
||||
this.closed = true;
|
||||
try {
|
||||
// Prevent all further flushing and rolling.
|
||||
closeBarrier.stopAndDrainOps();
|
||||
|
@ -1129,7 +1132,7 @@ public class FSHLog implements WAL {
|
|||
i.logCloseRequested();
|
||||
}
|
||||
}
|
||||
this.closed = true;
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Closing WAL writer in " + FSUtils.getPath(fullPathLogDir));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue