Skip to content

Commit

Permalink
Don't exit OldDeletedEntriesCleanupThread until a startup delay.
Browse files Browse the repository at this point in the history
Closes #310
  • Loading branch information
yevgenp committed Jun 18, 2024
1 parent 7781611 commit cfc635a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,9 @@ private static int[] inversePermutation(int[] permutation) {
public void run() {
throwExceptionIfClosed();

if (System.currentTimeMillis() - startTime < 1_000)
return;
long runningTime = System.currentTimeMillis() - startTime;
if (runningTime < 1_000)
sleepMillis(1_000 - runningTime);

while (!shutdown) {
int nextSegmentIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public MemoryLeaksTest(String testType, boolean replicated, boolean persisted, b
builder = ChronicleMap
.of(IntValue.class, String.class).constantKeySizeBySample(Values.newHeapInstance(IntValue.class))
.valueReaderAndDataAccess(new CountedStringReader(this), new StringUtf8DataAccess());
builder.cleanupRemovedEntries(false);
if (replicated)
builder.replication((byte) 1);
builder.entries(1).averageValueSize(10);
Expand Down

0 comments on commit cfc635a

Please sign in to comment.