Skip to content
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 @@ -96,9 +96,9 @@ public void setUpCluster() {
internalCluster().startMasterOnlyNode();
// Use a single thread pool for writes so we can enforce a consistent ordering
internalCluster().startDataOnlyNode(Settings.builder().put("thread_pool.write.size", 1).build());
internalCluster().startCoordinatingOnlyNode(Settings.EMPTY);
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/79300")
public void testUpdateByQuery() throws Exception {
final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
final boolean scriptEnabled = randomBoolean();
Expand All @@ -112,7 +112,6 @@ public void testUpdateByQuery() throws Exception {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/79300")
public void testReindex() throws Exception {
final String sourceIndex = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
final String targetIndex = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
Expand All @@ -135,7 +134,6 @@ public void testReindex() throws Exception {
});
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/79300")
public void testDeleteByQuery() throws Exception {
final String indexName = randomAlphaOfLength(10).toLowerCase(Locale.ROOT);
executeConcurrentUpdatesOnSubsetOfDocs(indexName,
Expand Down Expand Up @@ -217,7 +215,12 @@ Self extends AbstractBulkByScrollRequestBuilder<R, Self>> void executeConcurrent
}

// The bulk request is enqueued before the update by query
final ActionFuture<BulkResponse> bulkFuture = client().bulk(conflictingUpdatesBulkRequest);
// Since #77731 TransportBulkAction is dispatched into the Write thread pool,
// this test makes use of a deterministic task order in the data node write
// thread pool. To ensure that ordering, execute the TransportBulkAction
// in a coordinator node preventing that additional tasks are scheduled into
// the data node write thread pool.
final ActionFuture<BulkResponse> bulkFuture = internalCluster().coordOnlyNodeClient().bulk(conflictingUpdatesBulkRequest);

// Ensure that the concurrent writes are enqueued before the update by query request is sent
assertBusy(() -> assertThat(writeThreadPool.getQueue().size(), equalTo(1)));
Expand Down