HBASE-17033 LogRoller makes a lot of allocations unnecessarily

This commit is contained in:
Enis Soztutar 2016-11-07 14:18:00 -08:00
parent 2fdba6521d
commit b99690ac6b
1 changed files with 4 additions and 1 deletions

View File

@ -1242,6 +1242,7 @@ public class FSHLog implements WAL {
&& takeSyncFuture == null;
}
@Override
public void run() {
long currentSequence;
while (!isInterrupted()) {
@ -1666,7 +1667,9 @@ public class FSHLog implements WAL {
SyncFuture waitSafePoint(final SyncFuture syncFuture)
throws InterruptedException, FailedSyncBeforeLogCloseException {
while (true) {
if (this.safePointAttainedLatch.await(1, TimeUnit.NANOSECONDS)) break;
if (this.safePointAttainedLatch.await(1, TimeUnit.MILLISECONDS)) {
break;
}
if (syncFuture.isThrowable()) {
throw new FailedSyncBeforeLogCloseException(syncFuture.getThrowable());
}