Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ public void rebootWALDeleteThread() {
logger.info("Start rebooting wal delete thread.");
if (walDeleteThread != null) {
shutdownThread(walDeleteThread, ThreadName.WAL_DELETE);
walDeleteThread = null;
}
logger.info("Stop wal delete thread successfully, and now restart it.");
registerScheduleTask(0, config.getDeleteWalFilesPeriodInMs());
Expand All @@ -179,7 +180,7 @@ private void deleteOutdatedFiles() {
// threshold, the system continues to delete expired files until the disk size is smaller than
// the threshold.
boolean firstLoop = true;
while (firstLoop || shouldThrottle()) {
while ((firstLoop || shouldThrottle()) && !Thread.interrupted()) {
deleteOutdatedFilesInWALNodes();
if (firstLoop && shouldThrottle()) {
logger.warn(
Expand Down Expand Up @@ -275,7 +276,7 @@ public void stop() {
}

private void shutdownThread(ExecutorService thread, ThreadName threadName) {
thread.shutdown();
thread.shutdownNow();
try {
if (!thread.awaitTermination(30, TimeUnit.SECONDS)) {
logger.warn("Waiting thread {} to be terminated is timeout", threadName.getName());
Expand Down
Loading