Skip to content

Commit

Permalink
refactor with usage of waitForReplication().
Browse files Browse the repository at this point in the history
Signed-off-by: Rishikesh1159 <rishireddy1159@gmail.com>
  • Loading branch information
Rishikesh1159 committed Feb 8, 2024
1 parent d7e9027 commit de8e7e2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1555,11 +1555,16 @@ public void indexRandom(boolean forceRefresh, boolean dummyDocuments, boolean ma
);
}
}
if (forceRefresh) {
assertNoFailures(
client().admin().indices().prepareRefresh(indicesArray).setIndicesOptions(IndicesOptions.lenientExpandOpen()).get()
);
}
if (dummyDocuments) {
indexRandomForMultipleSlices(indicesArray);
}
if (forceRefresh) {
refreshAndWaitForReplication();
waitForReplication();
}
}

Expand Down

0 comments on commit de8e7e2

Please sign in to comment.