Fix BulkRejectionIT (#41446) (#41500)

* Due to #40866 one of the two parallel bulk requests can randomly be
rejected outright when the write queue is full already, we can catch
this situation and ignore it since we can still have the rejection for
the dynamic mapping udate for the other reuqest and it's somewhat rare
to run into this anyway
* Closes #41363
This commit is contained in:
Armin Braun 2019-04-24 20:46:21 +02:00 committed by GitHub
parent bb6ca25f70
commit 7c819fd2aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -22,6 +22,7 @@ import org.elasticsearch.action.ActionFuture;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.support.WriteRequest;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.EsRejectedExecutionException;
import org.elasticsearch.test.ESIntegTestCase;
import java.util.Collections;
@ -49,7 +50,6 @@ public class BulkRejectionIT extends ESIntegTestCase {
return 5;
}
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/41363")
public void testBulkRejectionAfterDynamicMappingUpdate() throws Exception {
final String index = "test";
assertAcked(prepareCreate(index));
@ -68,8 +68,12 @@ public class BulkRejectionIT extends ESIntegTestCase {
}
final ActionFuture<BulkResponse> bulkFuture1 = client().bulk(request1);
final ActionFuture<BulkResponse> bulkFuture2 = client().bulk(request2);
bulkFuture1.actionGet();
bulkFuture2.actionGet();
try {
bulkFuture1.actionGet();
bulkFuture2.actionGet();
} catch (EsRejectedExecutionException e) {
// ignored, one of the two bulk requests was rejected outright due to the write queue being full
}
internalCluster().assertSeqNos();
}
}