Skip to content

Commit

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

Signed-off-by: kkewwei <[email protected]>
Signed-off-by: kkewwei <[email protected]>
  • Loading branch information
kkewwei authored Nov 29, 2024
1 parent 6d3fd37 commit b75f27a
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 b75f27a

Please sign in to comment.