1
0
Эх сурвалжийг харах

[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
Tanguy Leroux 8 сар өмнө
parent
commit
106b66682e

+ 0 - 2
muted-tests.yml

@@ -332,8 +332,6 @@ tests:
 - class: org.elasticsearch.upgrades.VectorSearchIT
   method: testBBQVectorSearch {upgradedNodes=0}
   issue: https://github.com/elastic/elasticsearch/issues/121253
-- class: org.elasticsearch.lucene.FullClusterRestartLuceneIndexCompatibilityIT
-  issue: https://github.com/elastic/elasticsearch/issues/121257
 - class: org.elasticsearch.upgrades.VectorSearchIT
   method: testBBQVectorSearch {upgradedNodes=1}
   issue: https://github.com/elastic/elasticsearch/issues/121271

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

@@ -11,8 +11,6 @@ package org.elasticsearch.lucene;
 
 import org.elasticsearch.cluster.metadata.IndexMetadata;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.index.translog.Translog;
 import org.elasticsearch.repositories.fs.FsRepository;
 import org.elasticsearch.test.cluster.util.Version;
 
@@ -184,7 +182,6 @@ public class FullClusterRestartLuceneIndexCompatibilityIT extends FullClusterRes
                 Settings.builder()
                     .put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
                     .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, randomInt(2))
-                    .put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), randomFrom(Translog.Durability.values()))
                     .build()
             );
             indexDocs(index, numDocs);

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

@@ -13,8 +13,6 @@ import org.elasticsearch.client.Request;
 import org.elasticsearch.client.ResponseException;
 import org.elasticsearch.cluster.metadata.IndexMetadata;
 import org.elasticsearch.common.settings.Settings;
-import org.elasticsearch.index.IndexSettings;
-import org.elasticsearch.index.translog.Translog;
 import org.elasticsearch.repositories.fs.FsRepository;
 import org.elasticsearch.test.cluster.util.Version;
 
@@ -189,11 +187,7 @@ public class RollingUpgradeLuceneIndexCompatibilityTestCase extends RollingUpgra
             createIndex(
                 client(),
                 index,
-                Settings.builder()
-                    .put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
-                    .put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
-                    .put(IndexSettings.INDEX_TRANSLOG_DURABILITY_SETTING.getKey(), randomFrom(Translog.Durability.values()))
-                    .build()
+                Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0).build()
             );
             indexDocs(index, numDocs);
             return;