Skip to content

Commit

Permalink
fix(s3stream): release buffer on exception when compacting stream obj…
Browse files Browse the repository at this point in the history
…ects (#1322)

Signed-off-by: Shichao Nie <[email protected]>
  • Loading branch information
SCNieh authored May 30, 2024
1 parent 8585ffa commit 6f0bd74
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ public Optional<CompactStreamObjectRequest> compact() throws ExecutionException,
objectSize += basicObjectInfo.dataBlockSize() - validDataBlockStartPosition;
indexes.addComponent(true, subIndexes);
compactedObjectIds.add(object.objectId());
} catch (Throwable t) {
LOGGER.error("[COPY_WRITE_FAILED] streamId={}, objectId={}, {}", streamId, object.objectId(), t.getMessage());
indexes.release();
writer.release();
throw t;
}
}
if (lastIndex != null) {
Expand Down

0 comments on commit 6f0bd74

Please sign in to comment.