Skip to content

Commit

Permalink
Merge branch '2.1' into 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmarion committed Jan 2, 2025
2 parents 040a32c + 44b97f3 commit d0fb7f5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public void lock() {
return;
}
} catch (InterruptedException ex) {
// ignored
Thread.currentThread().interrupt();
log.warn("Interrupted while waiting to acquire lock", ex);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,22 +551,32 @@ private static void flushAll(final ClientContext context) {
try {
flusher.join(3000);
} catch (InterruptedException e) {
// ignore
Thread.currentThread().interrupt();
log.warn("Interrupted while waiting to join Flush thread", e);
}

while (flusher.isAlive() && System.currentTimeMillis() - start < 15000) {
int flushCount = flushesStarted.get();
try {
flusher.join(1000);
} catch (InterruptedException e) {
// ignore
Thread.currentThread().interrupt();
log.warn("Interrupted while waiting to join Flush thread", e);
}

if (flushCount == flushesStarted.get()) {
// no progress was made while waiting for join... maybe its stuck, stop waiting on it
break;
}
}

flusher.interrupt();
try {
flusher.join();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
log.warn("Interrupted while waiting to join Flush thread", e);
}
}

private static void stopServer(final ClientContext context, final boolean tabletServersToo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ private synchronized void startLogMaker() {
try {
nextLog.offer(t, 12, TimeUnit.HOURS);
} catch (InterruptedException ex) {
// ignore
// Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler
// will log this then halt the VM.
throw new Error("Next log maker thread interrupted", ex);
}

continue;
Expand Down Expand Up @@ -341,7 +343,9 @@ private synchronized void startLogMaker() {
try {
nextLog.offer(t, 12, TimeUnit.HOURS);
} catch (InterruptedException ex) {
// ignore
// Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler
// will log this then halt the VM.
throw new Error("Next log maker thread interrupted", ex);
}

continue;
Expand All @@ -352,7 +356,9 @@ private synchronized void startLogMaker() {
log.info("Our WAL was not used for 12 hours: {}", alog.getLogEntry());
}
} catch (InterruptedException e) {
// ignore - server is shutting down
// Throw an Error, not an Exception, so the AccumuloUncaughtExceptionHandler
// will log this then halt the VM.
throw new Error("Next log maker thread interrupted", e);
}
}
});
Expand Down

0 comments on commit d0fb7f5

Please sign in to comment.