Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable index refresh for TermsFixedDocCountErrorIT #11976

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Collection;

import static org.opensearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.opensearch.index.IndexSettings.MINIMUM_REFRESH_INTERVAL;
import static org.opensearch.search.SearchService.CLUSTER_CONCURRENT_SEGMENT_SEARCH_SETTING;
import static org.opensearch.search.aggregations.AggregationBuilders.terms;
import static org.opensearch.test.OpenSearchIntegTestCase.Scope.TEST;
Expand Down Expand Up @@ -71,7 +72,10 @@ public void testSimpleAggErrorMultiShard() throws Exception {
assertAcked(
prepareCreate("idx_mshard_1").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_mshard_1").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand All @@ -89,7 +93,10 @@ public void testSimpleAggErrorMultiShard() throws Exception {
assertAcked(
prepareCreate("idx_mshard_2").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_mshard_2").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand Down Expand Up @@ -127,7 +134,10 @@ public void testSimpleAggErrorSingleShard() throws Exception {
assertAcked(
prepareCreate("idx_shard_error").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_shard_error").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand Down Expand Up @@ -170,7 +180,10 @@ public void testSliceLevelDocCountErrorSingleShard() throws Exception {
assertAcked(
prepareCreate("idx_slice_error").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_slice_error").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand Down Expand Up @@ -248,7 +261,10 @@ public void testSliceLevelDocCountErrorMultiShard() throws Exception {
assertAcked(
prepareCreate("idx_mshard_1").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_mshard_1").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand Down Expand Up @@ -288,7 +304,10 @@ public void testSliceLevelDocCountErrorMultiShard() throws Exception {
assertAcked(
prepareCreate("idx_mshard_2").setMapping(STRING_FIELD_NAME, "type=keyword")
.setSettings(
Settings.builder().put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1).put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
Settings.builder()
.put(IndexMetadata.SETTING_NUMBER_OF_SHARDS, 1)
.put(IndexMetadata.SETTING_NUMBER_OF_REPLICAS, 0)
.put("index.refresh_interval", MINIMUM_REFRESH_INTERVAL)
)
);
client().prepareIndex("idx_mshard_2").setSource(jsonBuilder().startObject().field(STRING_FIELD_NAME, "A").endObject()).get();
Expand Down
Loading