Skip to content

Commit

Permalink
Fix Flaky Test SearchWithRandomExceptionsIT.testRandomExceptions (#16737
Browse files Browse the repository at this point in the history
)

Signed-off-by: kkewwei <[email protected]>
Signed-off-by: kkewwei <[email protected]>
(cherry picked from commit b75f27a)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 29, 2024
1 parent 8a53b04 commit 8367a70
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ public void testRandomExceptions() throws IOException, InterruptedException, Exe
logger.info("expected SearchPhaseException: [{}]", ex.getMessage());
}
}

// as the index refresh may fail, so the translog in the index will be not flushed,
// and `TranslogWriter.buffer` is not null, which causes arrays not been released,
// so we need to close the index to release the arrays.
cluster().wipeIndices("test");
}

public static final String EXCEPTION_TOP_LEVEL_RATIO_KEY = "index.engine.exception.ratio.top";
Expand Down

0 comments on commit 8367a70

Please sign in to comment.