-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>bugTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team
Description
This method is currently implemented this way:
protected Settings.Builder setRandomIndexSettings(Random random, Settings.Builder builder) {
setRandomIndexMergeSettings(random, builder);
setRandomIndexTranslogSettings(random, builder);
if (random.nextBoolean()) {
builder.put(MergeSchedulerConfig.AUTO_THROTTLE_SETTING.getKey(), false);
}
if (random.nextBoolean()) {
builder.put(IndicesRequestCache.INDEX_CACHE_REQUEST_ENABLED_SETTING.getKey(), random.nextBoolean());
}
if (random.nextBoolean()) {
builder.put(IndexSettings.INDEX_CHECK_ON_STARTUP.getKey(), randomFrom("false", "checksum", "true")); // <-- uses threadlocal Random
}
if (randomBoolean()) { // <- uses threadlocal Random
// keep this low so we don't stall tests
builder.put(UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING.getKey(),
RandomNumbers.randomIntBetween(random, 1, 15) + "ms");
}
return builder;
}It looks buggy as it is sometimes using the supplied Random and sometimes using the thread-local Random. I don't think it is a source of problems since it looks like the supplied Random is always equal to the thread-local Random, but we should clean this up?
Metadata
Metadata
Assignees
Labels
:Delivery/BuildBuild or test infrastructureBuild or test infrastructure>bugTeam:DeliveryMeta label for Delivery teamMeta label for Delivery team