Skip to content

Commit

Permalink
Log bob deserialization exception for snapshot blobs (#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajothomas authored Oct 9, 2024
1 parent 56c6267 commit d6ffeeb
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,13 @@ public CompletableFuture<SnapshotIndex> getSnapshotIndex(String blobId, Metadata
return FutureUtil.executeAsyncWithRetries(opName, () -> {
ByteArrayOutputStream indexBlobStream = new ByteArrayOutputStream(); // no need to close ByteArrayOutputStream
return blobStoreManager.get(blobId, indexBlobStream, metadata, getDeleted).toCompletableFuture()
.thenApplyAsync(f -> snapshotIndexSerde.fromBytes(indexBlobStream.toByteArray()), executor);
.thenApplyAsync(f -> snapshotIndexSerde.fromBytes(indexBlobStream.toByteArray()), executor)
.handle((snapshotIndex, ex) -> {
if (ex != null) {
throw new SamzaException(String.format("Unable to deserialize SnapshotIndex bytes for blob ID: %s", blobId), ex);
}
return snapshotIndex;
});
}, isCauseNonRetriable(), executor, retryPolicyConfig);
}

Expand Down

0 comments on commit d6ffeeb

Please sign in to comment.