Skip to content

Commit

Permalink
Stabilize RareClusterState (elastic#38671)
Browse files Browse the repository at this point in the history
* Use actual master node, not just a master elligible node when trying to cancel publication. This only works on the master and for unlucky seeds we never try the master within the 10s that the busy assert runs.
* Closes elastic#36813
  • Loading branch information
original-brownbear committed Feb 27, 2019
1 parent 995144b commit dc19ecc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ public void onFailure(String source, Exception e) {
private <Req extends ActionRequest, Res extends ActionResponse> ActionFuture<Res> executeAndCancelCommittedPublication(
ActionRequestBuilder<Req, Res> req) throws Exception {
ActionFuture<Res> future = req.execute();
assertBusy(() -> assertTrue(((Coordinator)internalCluster().getMasterNodeInstance(Discovery.class)).cancelCommittedPublication()));
assertBusy(
() -> assertTrue(((Coordinator)internalCluster().getCurrentMasterNodeInstance(Discovery.class)).cancelCommittedPublication()));
return future;
}

Expand Down Expand Up @@ -276,7 +277,6 @@ public void testDelayedMappingPropagationOnPrimary() throws Exception {
});
}

@AwaitsFix(bugUrl="https://github.com/elastic/elasticsearch/issues/36813")
public void testDelayedMappingPropagationOnReplica() throws Exception {
// This is essentially the same thing as testDelayedMappingPropagationOnPrimary
// but for replicas
Expand Down

0 comments on commit dc19ecc

Please sign in to comment.