From b4061d8aa4cda0853091b8b0b42e788ffaa8c68c Mon Sep 17 00:00:00 2001 From: Antonio Andelic Date: Wed, 8 Mar 2023 13:06:10 +0000 Subject: [PATCH] Add logs --- src/Coordination/Changelog.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Coordination/Changelog.cpp b/src/Coordination/Changelog.cpp index ddedae4fa0f..13da4dffac8 100644 --- a/src/Coordination/Changelog.cpp +++ b/src/Coordination/Changelog.cpp @@ -211,13 +211,20 @@ public: void flush() { auto * file_buffer = tryGetFileBuffer(); + LOG_TRACE(log, "Trying to flush"); if (file_buffer) { /// Fsync file system if needed if (log_file_settings.force_sync) + { file_buffer->sync(); + } else + { + LOG_TRACE(log, "Flushing with next, in buffer {}", file_buffer->offset()); file_buffer->next(); + LOG_TRACE(log, "Flushed in total {}", file_buffer->count()); + } } }