mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Add logs
This commit is contained in:
parent
37b09ce46a
commit
b4061d8aa4
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user