add flag to make CSV upload wait until entries are flushed

To make it easier/possible to write stable unit test the CSV upload
can optionally wait until all entries have been flushed to disk.
This is necessary for tests that ingest data and then read the data.
This commit is contained in:
2019-12-13 18:05:20 +01:00
parent 07ad62ddd9
commit 550d7ba44e
8 changed files with 79 additions and 16 deletions

View File

@@ -134,6 +134,12 @@ public class PerformanceDb implements AutoCloseable {
LOGGER.info("", e);
}
}
if (entries.isForceFlush()) {
LOGGER.info("flush triggered via entries.isForceFlush()");
dataStore.flush();
entries.notifyFlushed();
}
}
} catch (final RuntimeException e) {