Skip to content

Commit fdc3568

Browse files
authored
Disable dynamic mapping update in testTransportBulkTasks (#38073)
If a replica does not have a right mapping yet, we will retry the index request on that replica; then the actual tasks is higher than the expected tasks. Since #31140 this happens more frequently for we no longer require acking on the dynamic mapping of index requests. Relates #31140 Closes #37893
1 parent 00f75a4 commit fdc3568

File tree

1 file changed

+2
-1
lines changed
  • server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks

1 file changed

+2
-1
lines changed

server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TasksIT.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,15 @@ public void testTransportBroadcastReplicationTasks() {
291291
}
292292
}
293293

294-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/37893")
295294
public void testTransportBulkTasks() {
296295
registerTaskManageListeners(BulkAction.NAME); // main task
297296
registerTaskManageListeners(BulkAction.NAME + "[s]"); // shard task
298297
registerTaskManageListeners(BulkAction.NAME + "[s][p]"); // shard task on primary
299298
registerTaskManageListeners(BulkAction.NAME + "[s][r]"); // shard task on replica
300299
createIndex("test");
301300
ensureGreen("test"); // Make sure all shards are allocated to catch replication tasks
301+
// ensures the mapping is available on all nodes so we won't retry the request (in case replicas don't have the right mapping).
302+
client().admin().indices().preparePutMapping("test").setType("doc").setSource("foo", "type=keyword").get();
302303
client().prepareBulk().add(client().prepareIndex("test", "doc", "test_id")
303304
.setSource("{\"foo\": \"bar\"}", XContentType.JSON)).get();
304305

0 commit comments

Comments
 (0)