When /flush
handler on ingester is called, it triggers flush of all chunks. It logs following lines:
level=info ts=2020-06-18T08:23:53.474269984Z caller=flush.go:42 msg="starting to flush all the chunks"
level=info ts=2020-06-18T08:24:03.286485064Z caller=flush.go:44 msg="flushing of chunks complete"
But this is misleading. Chunks flush is not complete at this point, all unflushed chunks are only enqueued for flushing, and are waiting in the queue when this log message is written and handler returns.
We should make /flush
handler to wait for flush queues to be empty, if possible.