mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-10 06:55:32 +00:00
[TEST] Disable compression in BWC test for version < 1.3.2
The compression bug fixed in #7210 can still strike us since we are running BWC test against these version. This commit disables compression forcefully if the compatibility version is < 1.3.2 to prevent debugging already known issues.
This commit is contained in:
parent
f7d0f4d4e2
commit
16cb0dc7a6
@ -27,6 +27,8 @@ import org.elasticsearch.cluster.routing.ShardRouting;
|
|||||||
import org.elasticsearch.common.regex.Regex;
|
import org.elasticsearch.common.regex.Regex;
|
||||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||||
import org.elasticsearch.common.settings.Settings;
|
import org.elasticsearch.common.settings.Settings;
|
||||||
|
import org.elasticsearch.indices.recovery.RecoverySettings;
|
||||||
|
import org.elasticsearch.transport.Transport;
|
||||||
import org.elasticsearch.transport.TransportModule;
|
import org.elasticsearch.transport.TransportModule;
|
||||||
import org.elasticsearch.transport.TransportService;
|
import org.elasticsearch.transport.TransportService;
|
||||||
import org.elasticsearch.transport.netty.NettyTransport;
|
import org.elasticsearch.transport.netty.NettyTransport;
|
||||||
@ -146,9 +148,16 @@ public abstract class ElasticsearchBackwardsCompatIntegrationTest extends Elasti
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Settings nodeSettings(int nodeOrdinal) {
|
protected Settings nodeSettings(int nodeOrdinal) {
|
||||||
return ImmutableSettings.builder().put(requiredSettings())
|
ImmutableSettings.Builder builder = ImmutableSettings.builder().put(requiredSettings())
|
||||||
.put(TransportModule.TRANSPORT_TYPE_KEY, NettyTransport.class.getName()) // run same transport / disco as external
|
.put(TransportModule.TRANSPORT_TYPE_KEY, NettyTransport.class.getName()) // run same transport / disco as external
|
||||||
.put(TransportModule.TRANSPORT_SERVICE_TYPE_KEY, TransportService.class.getName()).build();
|
.put(TransportModule.TRANSPORT_SERVICE_TYPE_KEY, TransportService.class.getName());
|
||||||
|
if (compatibilityVersion().before(Version.V_1_3_2)) {
|
||||||
|
// if we test against nodes before 1.3.2 we disable all the compression due to a known bug
|
||||||
|
// see #7210
|
||||||
|
builder.put(Transport.TransportSettings.TRANSPORT_TCP_COMPRESS, false)
|
||||||
|
.put(RecoverySettings.INDICES_RECOVERY_COMPRESS, false);
|
||||||
|
}
|
||||||
|
return builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void assertAllShardsOnNodes(String index, String pattern) {
|
public void assertAllShardsOnNodes(String index, String pattern) {
|
||||||
|
@ -449,6 +449,7 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
|
|||||||
builder.put(StoreModule.DISTIBUTOR_KEY, random.nextBoolean() ? StoreModule.LEAST_USED_DISTRIBUTOR : StoreModule.RANDOM_WEIGHT_DISTRIBUTOR);
|
builder.put(StoreModule.DISTIBUTOR_KEY, random.nextBoolean() ? StoreModule.LEAST_USED_DISTRIBUTOR : StoreModule.RANDOM_WEIGHT_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
if (random.nextInt(10) == 0) { // do something crazy slow here
|
if (random.nextInt(10) == 0) { // do something crazy slow here
|
||||||
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
|
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 1, 10), ByteSizeUnit.MB));
|
||||||
@ -456,6 +457,11 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
|
|||||||
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
|
builder.put(RecoverySettings.INDICES_RECOVERY_MAX_BYTES_PER_SEC, new ByteSizeValue(RandomInts.randomIntBetween(random, 10, 200), ByteSizeUnit.MB));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (random.nextBoolean()) {
|
||||||
|
builder.put(RecoverySettings.INDICES_RECOVERY_COMPRESS, randomBoolean());
|
||||||
|
}
|
||||||
|
|
||||||
if (random.nextBoolean()) {
|
if (random.nextBoolean()) {
|
||||||
builder.put(FsTranslog.INDEX_TRANSLOG_FS_TYPE, RandomPicks.randomFrom(random, FsTranslogFile.Type.values()).name());
|
builder.put(FsTranslog.INDEX_TRANSLOG_FS_TYPE, RandomPicks.randomFrom(random, FsTranslogFile.Type.values()).name());
|
||||||
}
|
}
|
||||||
@ -472,7 +478,11 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
|
|||||||
builder.put(IndicesFieldDataCache.FIELDDATA_CACHE_CONCURRENCY_LEVEL, randomIntBetween(1, 32));
|
builder.put(IndicesFieldDataCache.FIELDDATA_CACHE_CONCURRENCY_LEVEL, randomIntBetween(1, 32));
|
||||||
builder.put(IndicesFilterCache.INDICES_CACHE_FILTER_CONCURRENCY_LEVEL, randomIntBetween(1, 32));
|
builder.put(IndicesFilterCache.INDICES_CACHE_FILTER_CONCURRENCY_LEVEL, randomIntBetween(1, 32));
|
||||||
}
|
}
|
||||||
|
if (globalCompatibilityVersion().before(Version.V_1_3_2)) {
|
||||||
|
// if we test against nodes before 1.3.2 we disable all the compression due to a known bug
|
||||||
|
// see #7210
|
||||||
|
builder.put(RecoverySettings.INDICES_RECOVERY_COMPRESS, false);
|
||||||
|
}
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user