[FEAT MERGE] cherry pick restore_pf_opt from 421release to master

This commit is contained in:
HaHaJeff
2023-11-23 04:15:59 +00:00
committed by ob-robot
parent 16f37c94b6
commit a19665eec0
37 changed files with 604 additions and 128 deletions

View File

@ -211,6 +211,7 @@ int PalfEnvImpl::init(
const int64_t cluster_id,
const int64_t tenant_id,
rpc::frame::ObReqTransport *transport,
obrpc::ObBatchRpc *batch_rpc,
common::ObILogAllocator *log_alloc_mgr,
ILogBlockPool *log_block_pool,
PalfMonitorCb *monitor)
@ -221,10 +222,10 @@ int PalfEnvImpl::init(
if (is_inited_) {
ret = OB_INIT_TWICE;
PALF_LOG(ERROR, "PalfEnvImpl is inited twiced", K(ret));
} else if (OB_ISNULL(base_dir) || !self.is_valid() || NULL == transport
} else if (OB_ISNULL(base_dir) || !self.is_valid() || NULL == transport || NULL == batch_rpc
|| OB_ISNULL(log_alloc_mgr) || OB_ISNULL(log_block_pool) || OB_ISNULL(monitor)) {
ret = OB_INVALID_ARGUMENT;
PALF_LOG(ERROR, "invalid arguments", K(ret), KP(transport), K(base_dir), K(self), KP(transport),
PALF_LOG(ERROR, "invalid arguments", K(ret), KP(transport), KP(batch_rpc), K(base_dir), K(self), KP(transport),
KP(log_alloc_mgr), KP(log_block_pool), KP(monitor));
} else if (OB_FAIL(init_log_io_worker_config_(options.disk_options_.log_writer_parallelism_,
tenant_id,
@ -232,7 +233,7 @@ int PalfEnvImpl::init(
PALF_LOG(WARN, "init_log_io_worker_config_ failed", K(options));
} else if (OB_FAIL(fetch_log_engine_.init(this, log_alloc_mgr))) {
PALF_LOG(ERROR, "FetchLogEngine init failed", K(ret));
} else if (OB_FAIL(log_rpc_.init(self, cluster_id, tenant_id, transport))) {
} else if (OB_FAIL(log_rpc_.init(self, cluster_id, tenant_id, transport, batch_rpc))) {
PALF_LOG(ERROR, "LogRpc init failed", K(ret));
} else if (OB_FAIL(cb_thread_pool_.init(io_cb_num, this))) {
PALF_LOG(ERROR, "LogIOTaskThreadPool init failed", K(ret));