Skip to content

Commit

Permalink
adapt to the newest libserverframe
Browse files Browse the repository at this point in the history
  • Loading branch information
happyfish100 committed Oct 7, 2024
1 parent f7f3260 commit d5cdca9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/server/binlog/binlog_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ static int init_dump_ctx(FDIRBinlogDumpContext *dump_ctx,
const uint64_t next_version = 1;
const int buffer_size = 1024 * 1024;
const short order_mode = SF_BINLOG_THREAD_ORDER_MODE_VARY;
const int write_interval_ms = 0;
const int max_delay = 3;
const int max_record_size = 0; //use the binlog buffer of the caller
const bool use_fixed_buffer_size = true;
Expand Down Expand Up @@ -190,8 +191,9 @@ static int init_dump_ctx(FDIRBinlogDumpContext *dump_ctx,
SF_FILE_WRITER_FLAGS_WANT_DONE_VERSION);

return sf_binlog_writer_init_thread_ex(&dump_ctx->bwctx.thread,
subdir_name, &dump_ctx->bwctx.writer, order_mode, max_delay,
max_record_size, use_fixed_buffer_size, passive_write);
subdir_name, &dump_ctx->bwctx.writer, order_mode,
write_interval_ms, max_delay, max_record_size,
use_fixed_buffer_size, passive_write);
}

static void destroy_dump_ctx(FDIRBinlogDumpContext *dump_ctx)
Expand Down
5 changes: 3 additions & 2 deletions src/server/binlog/binlog_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SFBinlogWriterContext g_binlog_writer_ctx;

int binlog_write_init()
{
const int write_interval_ms = 0;
const int max_delay = 1;
const int binlog_init_buffer_size = 1024;
const bool use_fixed_buffer_size = false;
Expand All @@ -57,8 +58,8 @@ int binlog_write_init()

if ((result=sf_binlog_writer_init_thread_ex(&g_binlog_writer_ctx.thread,
FDIR_BINLOG_SUBDIR_NAME, &g_binlog_writer_ctx.writer,
SF_BINLOG_THREAD_ORDER_MODE_VARY, max_delay,
binlog_init_buffer_size, use_fixed_buffer_size,
SF_BINLOG_THREAD_ORDER_MODE_VARY, write_interval_ms,
max_delay, binlog_init_buffer_size, use_fixed_buffer_size,
passive_write)) != 0)
{
return result;
Expand Down

0 comments on commit d5cdca9

Please sign in to comment.