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

Relax Overly Strict Assertion in TransportShardBulkAction #40940

Merged
merged 3 commits into from
Apr 8, 2019
Merged
Show file tree
Hide file tree
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 @@ -147,7 +147,7 @@ public static void performOnPrimary(
Consumer<ActionListener<Void>> waitForMappingUpdate,
ActionListener<PrimaryResult<BulkShardRequest, BulkShardResponse>> listener,
ThreadPool threadPool) {
new ActionRunnable<PrimaryResult<BulkShardRequest, BulkShardResponse>>(listener) {
new ActionRunnable<>(listener) {

private final Executor executor = threadPool.executor(ThreadPool.Names.WRITE);

Expand Down Expand Up @@ -189,11 +189,11 @@ public void onRejection(Exception e) {
}

private void finishRequest() {
listener.onResponse(
new WritePrimaryResult<>(context.getBulkShardRequest(), context.buildShardResponse(), context.getLocationToSync(),
null, context.getPrimary(), logger));
ActionListener.completeWith(listener,
() -> new WritePrimaryResult<>(
context.getBulkShardRequest(), context.buildShardResponse(), context.getLocationToSync(), null,
context.getPrimary(), logger));
}

}.run();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public void testNotCreatedWhenNoOtherMlIndices() {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/40933")
public void testCreatedWhenAfterOtherMlIndex() throws Exception {

Auditor auditor = new Auditor(client(), "node_1");
Expand Down