Skip to content

Commit

Permalink
removing primary search preference as relocation is happening here
Browse files Browse the repository at this point in the history
  • Loading branch information
gbbafna committed Sep 4, 2023
1 parent 6753be8 commit a437510
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -61,6 +61,7 @@ protected Collection<Class<? extends Plugin>> nodePlugins() {
* This test creates a scenario where a primary shard (0 replicas) relocates and is in POST_RECOVERY on the target
* node but already deleted on the source node. Search request should still work.
*/
@AwaitsFix(bugUrl = "This would work when we remove primary search preference from all")
public void testSearchWithRelocationAndSlowClusterStateProcessing() throws Exception {
// Don't use AbstractDisruptionTestCase.DEFAULT_SETTINGS as settings
// (which can cause node disconnects on a slow CI machine)
Expand All @@ -87,6 +88,6 @@ public void testSearchWithRelocationAndSlowClusterStateProcessing() throws Excep

IndicesStoreIntegrationIT.relocateAndBlockCompletion(logger, "test", 0, node_1, node_2);
// now search for the documents and see if we get a reply
assertThat(client().prepareSearch().setPreference("_primary").setSize(0).get().getHits().getTotalHits().value, equalTo(100L));
assertThat(client().prepareSearch().setSize(0).get().getHits().getTotalHits().value, equalTo(100L));
}
}

0 comments on commit a437510

Please sign in to comment.