Assertion failure in replica promotion for a closed remote translog enabled index while writing Integ tests #8485
Labels
enhancement
Enhancement or improvement to existing feature or request
Storage:Durability
Issues and PRs related to the durability framework
Is your feature request related to a problem? Please describe.
While writing tests for recovery flow as part of #8476, discovered that NoOpEngine is created when the index is closed. In this test, I am creating a remote translog enabled with 0 replica, index some docs, then closing the index. Post that, updating index settings to increase replica count to 1. Then stopping the node which has the
OpenSearch/server/src/main/java/org/opensearch/indices/IndicesService.java
Lines 838 to 843 in c1c23b4
During replica to primary promotion, below method is hit on the replica shard -
OpenSearch/server/src/main/java/org/opensearch/index/shard/IndexShard.java
Lines 550 to 556 in c1c23b4
At the end of this method, the control reaches to
turnOffTranslogRetention();
-https://github.com/opensearch-project/OpenSearch/blob/c1c23b42e335bb337c668c9cf9dccd8b71dfdbab/server/src/main/java/org/opensearch/index/shard/IndexShard.java#L748C4-L759
This ultimately hits the below assertion which fails -
OpenSearch/server/src/main/java/org/opensearch/index/engine/NoOpEngine.java
Lines 209 to 216 in c1c23b4
Describe the solution you'd like
Need to think over on this.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: