Skip to content

Commit

Permalink
Add flush and refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks committed Dec 5, 2024
1 parent 8c5506a commit 631d8c1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ public void stop(boolean checkActiveThreads) throws IOException {
Client client = clientNode().getInternalNodeClient();
AdminClient adminClient = client.admin();

adminClient.indices().prepareFlush().get();
adminClient.indices().prepareRefresh().get();

if (checkActiveThreads) {
int maxRetries = 3;
int retryCount = 0;
Expand Down

0 comments on commit 631d8c1

Please sign in to comment.