Closed alexeyklyukin closed 6 years ago
two points here:
tempDir
, and flush data directly to the archiveDir
. Also there should be monitoring(most likely prometheus http endpoint) to see the number of the buffer files which need to be flushed to the archiveDir
Right now we write each delta to a delta file right away. What we could do to improve the performance is to write those deltas to the memory buffer first, flushing them when we fill the file.
As a related note, we could also send the flush response back to the server once we write all deltas to the file, fsync and close it. By not doing fsync we risk losing some records on crash, since the server usually disposes of them after receiving the flush.