[BUG] Close refresh listeners during primary relocation of remote enabled indexes #11320
Labels
bug
Something isn't working
Storage:Durability
Issues and PRs related to the durability framework
Storage:Remote
v2.12.0
Issues and PRs related to version 2.12.0
Describe the bug
During the peer recovery relocation, we close Closeable internal refresh listeners. This is present to ensure that we drain all ongoing refreshes before primary hand-off. There is a code bug that is causing the listeners to not close.
OpenSearch/server/src/main/java/org/opensearch/index/shard/IndexShard.java
Lines 860 to 864 in fe2d585
This has been found by the below check during shard creation.
OpenSearch/server/src/main/java/org/opensearch/index/remote/RemoteStoreUtils.java
Lines 85 to 102 in 5bb6cae
To Reproduce
Simulate conditions so that there is a retry ongoing in RemoteStoreRefreshListener. The upload can succeed after the new primary mode has started uploading segment and translog files.
Expected behavior
The older primary should not upload once the handoff has been done.
Plugins
Please list all plugins currently enabled.
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: