From 404f374397b20b8fcec157995e27c67660154af3 Mon Sep 17 00:00:00 2001 From: YuQing <384681@qq.com> Date: Sun, 12 Mar 2023 11:29:56 +0800 Subject: [PATCH] remove useless field: tag --- src/sf_binlog_writer.c | 8 ++++---- src/sf_binlog_writer.h | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/sf_binlog_writer.c b/src/sf_binlog_writer.c index 1fafd37..2181ea0 100644 --- a/src/sf_binlog_writer.c +++ b/src/sf_binlog_writer.c @@ -73,9 +73,9 @@ static int deal_record_by_version(SFBinlogWriterBuffer *wb) if (wb->version.first < writer->version_ctx.next) { logError("file: "__FILE__", line: %d, subdir_name: %s, " "current version: %"PRId64" is too small which " - "less than %"PRId64", tag: %"PRId64", buffer(%d): %.*s", + "less than %"PRId64", buffer(%d): %.*s", __LINE__, writer->fw.cfg.subdir_name, wb->version.first, - writer->version_ctx.next, wb->tag, wb->bf.length, + writer->version_ctx.next, wb->bf.length, wb->bf.length, wb->bf.buff); fast_mblock_free_object(&writer->thread->mblock, wb); return 0; @@ -435,8 +435,8 @@ int sf_binlog_writer_init_by_version_ex(SFBinlogWriterInfo *writer, int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread, const char *name, SFBinlogWriterInfo *writer, const short order_mode, - const int max_record_size, const int writer_count, - const bool use_fixed_buffer_size, const bool passive_write) + const int max_record_size, const bool use_fixed_buffer_size, + const bool passive_write) { const int alloc_elements_once = 1024; int result; diff --git a/src/sf_binlog_writer.h b/src/sf_binlog_writer.h index eb71305..8103869 100644 --- a/src/sf_binlog_writer.h +++ b/src/sf_binlog_writer.h @@ -44,7 +44,6 @@ struct sf_binlog_writer_info; typedef struct sf_binlog_writer_buffer { SFVersionRange version; BufferInfo bf; - int64_t tag; int type; //for versioned writer struct sf_binlog_writer_info *writer; struct sf_binlog_writer_buffer *next; @@ -114,8 +113,8 @@ int sf_binlog_writer_init_by_version_ex(SFBinlogWriterInfo *writer, int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread, const char *name, SFBinlogWriterInfo *writer, const short order_mode, - const int max_record_size, const int writer_count, - const bool use_fixed_buffer_size, const bool passive_write); + const int max_record_size, const bool use_fixed_buffer_size, + const bool passive_write); #define sf_binlog_writer_init_normal(writer, \ data_path, subdir_name, buffer_size) \ @@ -131,7 +130,7 @@ int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread, #define sf_binlog_writer_init_thread(thread, name, writer, max_record_size) \ sf_binlog_writer_init_thread_ex(thread, name, writer, \ SF_BINLOG_THREAD_ORDER_MODE_FIXED, \ - max_record_size, 1, true, false) + max_record_size, true, false) static inline int sf_binlog_writer_init_ex(SFBinlogWriterContext *context, const char *data_path, const char *subdir_name,