[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
This commit is contained in:
Tanguy Leroux 2025-02-03 12:05:30 +01:00 committed by GitHub
parent 85f5222d69
commit 106b66682e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 12 deletions

View File

@ -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

View File

@ -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);

View File

@ -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;