Skip to content

Commit

Permalink
Disable dynamic mapping update in testTransportBulkTasks (elastic#38073)
Browse files Browse the repository at this point in the history
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 elastic#31140 this happens more frequently for we no
longer require acking on the dynamic mapping of index requests.

Relates elastic#31140
Closes elastic#37893
  • Loading branch information
dnhatn committed Feb 1, 2019
1 parent 7077cb3 commit 854a14b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,15 @@ public void testTransportBroadcastReplicationTasks() {
}
}

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

Expand Down

0 comments on commit 854a14b

Please sign in to comment.