various fixes

This commit is contained in:
2020-08-11 16:12:18 +02:00
parent 8647931da8
commit 3e77c2a103
10 changed files with 71 additions and 57 deletions

View File

@@ -137,8 +137,10 @@ public class PerformanceDb implements AutoCloseable {
}
if (entries.isForceFlush()) {
LOGGER.info("flush triggered via entries.isForceFlush()");
LOGGER.debug("flush triggered via entries.isForceFlush()");
final long start = System.nanoTime();
dataStore.flush();
LOGGER.debug("flush duration: {}ms", (System.nanoTime() - start) / 1_000_000.0);
entries.notifyFlushed();
}
}
@@ -147,8 +149,9 @@ public class PerformanceDb implements AutoCloseable {
throw new WriteException(e);
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
LOGGER.info("Thread was interrupted. Aborting exectution.");
LOGGER.info("Thread was interrupted. Aborting execution.");
} finally {
LOGGER.info("flush after inserting all data");
dataStore.flush();
}
}