Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log bob deserialization exception for snapshot blobs #1711

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

ajothomas
Copy link
Contributor

Symptom:
BlobStoreUtil doesn't log the blob id today when it fails to deserialize the snapshot blob. Without the blob id, it is tricky to debug why the deserialization issue happened.

Changes:

  • Log the blob id if we are unable to deserialize the snapshot blobs

Tests:

  • ./gradlew build

API Changes:
None

Upgrade Instructions:
None

Usage Instructions:
None

@ajothomas ajothomas merged commit d6ffeeb into apache:master Oct 9, 2024
1 check passed
Copy link
Contributor

@xinyuiscool xinyuiscool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please also check other places, e.g. GET a data blob, PUT for adding TTL, and see whether we log the blobId there when the exception happens? I think this change should apply across all the requests. Thanks.

.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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we might get other kinds of exceptions here, e.g. GET exceptions, so change the log message to be "Unable to get SnapshotIndex ..." ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants