Skip to content

Commit

Permalink
fix(s3stream): fix dead lock issue (#1810)
Browse files Browse the repository at this point in the history
Signed-off-by: SSpirits <[email protected]>
  • Loading branch information
ShadowySpirits authored Aug 15, 2024
1 parent fd03fb4 commit 9e4eafb
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void start() {
.filter(uploadTime -> time.nanoseconds() - uploadTime > DEFAULT_UPLOAD_WARNING_TIMEOUT)
.count();
if (count > 0) {
log.warn("Found {} pending upload tasks exceed 5s.", count);
log.error("Found {} pending upload tasks exceed 5s.", count);
}
} catch (Throwable ignore) {
}
Expand Down Expand Up @@ -528,7 +528,8 @@ assert record != null;
if (throwable instanceof WALFencedException) {
List<Record> uploadedRecords = uploadMap.remove(firstOffset);
Throwable finalThrowable = throwable;
uploadedRecords.forEach(record -> record.future.completeExceptionally(finalThrowable));
// Release lock and complete future in callback thread.
callbackService.submit(() -> uploadedRecords.forEach(record -> record.future.completeExceptionally(finalThrowable)));
} else if (throwable != null) {
// Never fail the write task, the under layer storage will retry forever.
log.error("[Bug] Failed to write records to S3: {}", firstOffset, throwable);
Expand Down

0 comments on commit 9e4eafb

Please sign in to comment.