[BUG] Fix exception handling for global metadata upload #10888
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
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.
OpenSearch/server/src/main/java/org/opensearch/gateway/remote/RemoteClusterStateService.java
Lines 381 to 384 in 5bd413c
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
The text was updated successfully, but these errors were encountered: