remove useless field: tag
parent
dfc14de25d
commit
404f374397
|
|
@ -73,9 +73,9 @@ static int deal_record_by_version(SFBinlogWriterBuffer *wb)
|
||||||
if (wb->version.first < writer->version_ctx.next) {
|
if (wb->version.first < writer->version_ctx.next) {
|
||||||
logError("file: "__FILE__", line: %d, subdir_name: %s, "
|
logError("file: "__FILE__", line: %d, subdir_name: %s, "
|
||||||
"current version: %"PRId64" is too small which "
|
"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,
|
__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);
|
wb->bf.length, wb->bf.buff);
|
||||||
fast_mblock_free_object(&writer->thread->mblock, wb);
|
fast_mblock_free_object(&writer->thread->mblock, wb);
|
||||||
return 0;
|
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,
|
int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread,
|
||||||
const char *name, SFBinlogWriterInfo *writer, const short order_mode,
|
const char *name, SFBinlogWriterInfo *writer, const short order_mode,
|
||||||
const int max_record_size, const int writer_count,
|
const int max_record_size, const bool use_fixed_buffer_size,
|
||||||
const bool use_fixed_buffer_size, const bool passive_write)
|
const bool passive_write)
|
||||||
{
|
{
|
||||||
const int alloc_elements_once = 1024;
|
const int alloc_elements_once = 1024;
|
||||||
int result;
|
int result;
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ struct sf_binlog_writer_info;
|
||||||
typedef struct sf_binlog_writer_buffer {
|
typedef struct sf_binlog_writer_buffer {
|
||||||
SFVersionRange version;
|
SFVersionRange version;
|
||||||
BufferInfo bf;
|
BufferInfo bf;
|
||||||
int64_t tag;
|
|
||||||
int type; //for versioned writer
|
int type; //for versioned writer
|
||||||
struct sf_binlog_writer_info *writer;
|
struct sf_binlog_writer_info *writer;
|
||||||
struct sf_binlog_writer_buffer *next;
|
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,
|
int sf_binlog_writer_init_thread_ex(SFBinlogWriterThread *thread,
|
||||||
const char *name, SFBinlogWriterInfo *writer, const short order_mode,
|
const char *name, SFBinlogWriterInfo *writer, const short order_mode,
|
||||||
const int max_record_size, const int writer_count,
|
const int max_record_size, const bool use_fixed_buffer_size,
|
||||||
const bool use_fixed_buffer_size, const bool passive_write);
|
const bool passive_write);
|
||||||
|
|
||||||
#define sf_binlog_writer_init_normal(writer, \
|
#define sf_binlog_writer_init_normal(writer, \
|
||||||
data_path, subdir_name, buffer_size) \
|
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) \
|
#define sf_binlog_writer_init_thread(thread, name, writer, max_record_size) \
|
||||||
sf_binlog_writer_init_thread_ex(thread, name, writer, \
|
sf_binlog_writer_init_thread_ex(thread, name, writer, \
|
||||||
SF_BINLOG_THREAD_ORDER_MODE_FIXED, \
|
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,
|
static inline int sf_binlog_writer_init_ex(SFBinlogWriterContext *context,
|
||||||
const char *data_path, const char *subdir_name,
|
const char *data_path, const char *subdir_name,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue