From fc9c23fb959dd43283e466feb0b53e7e875510f5 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Mon, 17 Feb 2025 10:54:07 +0800 Subject: [PATCH] call flush_writer_files before rotate file --- src/sf_binlog_writer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sf_binlog_writer.c b/src/sf_binlog_writer.c index 5597f5b..7f7009b 100644 --- a/src/sf_binlog_writer.c +++ b/src/sf_binlog_writer.c @@ -197,6 +197,7 @@ static int deal_binlog_records(SFBinlogWriterThread *thread, thread->mblock, current); break; case SF_BINLOG_BUFFER_TYPE_ROTATE_FILE: + flush_writer_files(thread); skip_empty_file = current->version.first; if (!(skip_empty_file && current->writer->fw.file.size == 0)) { if ((result=sf_file_writer_set_binlog_write_index(¤t->