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

Fix throwing deserialization exceptions for SnapshotIndexBlobs #1712

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ajothomas
Copy link
Contributor

@ajothomas ajothomas commented Oct 11, 2024

Bug:
BlobStoreUtil's getSnapshotIndex method currently gets the SnapshotIndex blob using BlobStoreManager#get and deserializes it using SnapshotIndexSerde
We chain the deserialization logic to the get future and in turn chain handle to the deserialization future which tries to capture deserialization exceptions. This is incorrect as any exceptions that occurred during snapshot index get would also be processed by the chained handle.

This presents two issues:

  • The current exception message says that the error is due to deserialization which is incorrect. It could have been due to some arbitrary exception during get
  • It also wraps any exception into SamzaException class. get implementation of BlobStoreManager classifies some exceptions into retriable exceptions which will become useless if we wrap it into SamzaException.

Changes:

  • Catch deserialization exception and throw appropriate message within thenApplyAsync where we deserialize the SnapshotIndex bytes.

Tests:

  • ./gradlew build
  • Added unit tests to assert if appropriate exception is thrown

API Changes:
None

Upgrade Instructions:
None

Usage Instructions:
None

…sync method of the get future instead of handle
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.

1 participant