diff --git a/src/rootserver/ob_tablet_creator.cpp b/src/rootserver/ob_tablet_creator.cpp index 157ead2f7b..0e0acd42f1 100644 --- a/src/rootserver/ob_tablet_creator.cpp +++ b/src/rootserver/ob_tablet_creator.cpp @@ -269,7 +269,8 @@ int ObTabletCreator::add_create_tablet_arg(const ObTabletCreatorArg &arg) } if (OB_FAIL(ret)) { - } else if (batch_arg->arg_.get_serialize_size() > transaction::ObTxMultiDataSourceLog::MAX_MDS_LOG_SIZE) { + } else if (batch_arg->arg_.get_serialize_size() > BATCH_ARG_SIZE) { + LOG_INFO("batch arg is more than 1M", KR(ret), K(batch_arg->arg_.tablets_.count()), K(batch_arg->arg_)); void *arg_buf = allocator_.alloc(sizeof(ObBatchCreateTabletHelper)); ObBatchCreateTabletHelper *new_arg = NULL; if (OB_ISNULL(arg_buf)) { @@ -318,7 +319,6 @@ int ObTabletCreator::execute() LOG_WARN("batch arg not be null", KR(ret)); } else { while (OB_SUCC(ret) && OB_NOT_NULL(batch_arg)) { - LOG_INFO("generate create arg", KPC(batch_arg), K(lbt())); int64_t buf_len = batch_arg->arg_.get_serialize_size(); int64_t pos = 0; char *buf = (char*)allocator_.alloc(buf_len); @@ -331,6 +331,7 @@ int ObTabletCreator::execute() LOG_WARN("fail to set timeout ctx", KR(ret), K(default_timeout_ts)); } else { do { + LOG_INFO("generate create arg", K(buf_len), K(batch_arg->arg_.tablets_.count()), K(batch_arg->arg_)); if (ctx.is_timeouted()) { ret = OB_TIMEOUT; LOG_WARN("already timeout", KR(ret), K(ctx)); diff --git a/src/rootserver/ob_tablet_creator.h b/src/rootserver/ob_tablet_creator.h index a71f4ba2d6..6bfe80c9d7 100644 --- a/src/rootserver/ob_tablet_creator.h +++ b/src/rootserver/ob_tablet_creator.h @@ -95,6 +95,10 @@ private: class ObTabletCreator { public: +// 1. BATCH_ARG_SIZE cannot be too large to cause get_serialize_size to take too long +// 2. BATCH_ARG_SIZE cannot be more than multi-trans buffer limit (1.5M) +const static int64_t BATCH_ARG_SIZE = 1024 * 1024; // 1M + ObTabletCreator( const uint64_t tenant_id, const share::SCN &major_frozen_scn,