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

[BUG] Fix exception handling for global metadata upload #10888

Closed
dhwanilpatel opened this issue Oct 24, 2023 · 0 comments · Fixed by #10889
Closed

[BUG] Fix exception handling for global metadata upload #10888

dhwanilpatel opened this issue Oct 24, 2023 · 0 comments · Fixed by #10889
Assignees
Labels
bug Something isn't working Cluster Manager Storage:Remote Storage Issues and PRs relating to data and metadata storage v2.12.0 Issues and PRs related to version 2.12.0

Comments

@dhwanilpatel
Copy link
Contributor

Describe the bug
If there is any exception occur during global metadata upload, onFailure of completionActionListener will be invoked. Today it throws the GlobalMetadataTransferException from onResponse of action listener.

LatchedActionListener completionListener = new LatchedActionListener<>(ActionListener.wrap(resp -> {
logger.trace(String.format(Locale.ROOT, "GlobalMetadata uploaded successfully."));
result.set(globalMetadataContainer.path().buildAsString() + globalMetadataFilename);
}, ex -> { throw new GlobalMetadataTransferException(ex.getMessage(), ex); }), latch);

For async writes, this action listener can be invoked from different thread as well. So exception thrown from action listener will be lost and response of writeGlobalMetadata will become null and corrupt the manifest files.

Fix
We will need to store the referance of the exception from action listener, and need checks on it before returning from writeGlobalMetadata

@dhwanilpatel dhwanilpatel added bug Something isn't working untriaged labels Oct 24, 2023
@linuxpi linuxpi added Cluster Manager Storage Issues and PRs relating to data and metadata storage Storage:Remote v2.12.0 Issues and PRs related to version 2.12.0 and removed untriaged labels Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cluster Manager Storage:Remote Storage Issues and PRs relating to data and metadata storage v2.12.0 Issues and PRs related to version 2.12.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants