Skip to content

Commit 106b666

Browse files
authored
[Test] Remove ASYNC translog durability in N-2 bwc upgrade tests (#121278)
When adding support for upgrading closed indices in N-2 version, I randomized the Translog.Durability setting of the closed index with the aim to test the 2 phases closing process. This caused at least 1 test failure on Windows with the index being closed and the cluster upgraded before the synchronization of the translog had a chance to be executed. I think this cause the engine to be reset on the replica that is promoted as a primary, causing the loss of the operations that were not yet persisted. Closes #121257
1 parent 85f5222 commit 106b666

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,6 @@ tests:
332332
- class: org.elasticsearch.upgrades.VectorSearchIT
333333
method: testBBQVectorSearch {upgradedNodes=0}
334334
issue: https://github.com/elastic/elasticsearch/issues/121253
335-
- class: org.elasticsearch.lucene.FullClusterRestartLuceneIndexCompatibilityIT
336-
issue: https://github.com/elastic/elasticsearch/issues/121257
337335
- class: org.elasticsearch.upgrades.VectorSearchIT
338336
method: testBBQVectorSearch {upgradedNodes=1}
339337
issue: https://github.com/elastic/elasticsearch/issues/121271

qa/lucene-index-compatibility/src/javaRestTest/java/org/elasticsearch/lucene/FullClusterRestartLuceneIndexCompatibilityIT.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
import org.elasticsearch.cluster.metadata.IndexMetadata;
1313
import org.elasticsearch.common.settings.Settings;
14-
import org.elasticsearch.index.IndexSettings;
15-
import org.elasticsearch.index.translog.Translog;
1614
import org.elasticsearch.repositories.fs.FsRepository;
1715
import org.elasticsearch.test.cluster.util.Version;
1816

@@ -184,7 +182,6 @@ public void testClosedIndexUpgrade() throws Exception {
184182
Settings.builder()
185183
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
186184
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, randomInt(2))
187-
.put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), randomFrom(Translog.Durability.values()))
188185
.build()
189186
);
190187
indexDocs(index, numDocs);

qa/lucene-index-compatibility/src/javaRestTest/java/org/elasticsearch/lucene/RollingUpgradeLuceneIndexCompatibilityTestCase.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import org.elasticsearch.client.ResponseException;
1414
import org.elasticsearch.cluster.metadata.IndexMetadata;
1515
import org.elasticsearch.common.settings.Settings;
16-
import org.elasticsearch.index.IndexSettings;
17-
import org.elasticsearch.index.translog.Translog;
1816
import org.elasticsearch.repositories.fs.FsRepository;
1917
import org.elasticsearch.test.cluster.util.Version;
2018

@@ -189,11 +187,7 @@ public void testClosedIndexUpgrade() throws Exception {
189187
createIndex(
190188
client(),
191189
index,
192-
Settings.builder()
193-
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
194-
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
195-
.put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), randomFrom(Translog.Durability.values()))
196-
.build()
190+
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).build()
197191
);
198192
indexDocs(index, numDocs);
199193
return;

0 commit comments

Comments
 (0)