[OBCDC] add compat-cdc case
This commit is contained in:
parent
7d8c4a42fc
commit
305b0935e5
@ -950,14 +950,14 @@ int FetchStream::handle_fetch_log_error_(
|
||||
if (OB_SUCCESS != rcode.rcode_) {
|
||||
need_kick_out = true;
|
||||
kick_out_reason = FETCH_LOG_FAIL_ON_RPC;
|
||||
LOG_ERROR("fetch log fail on rpc", K(svr_), K(rcode), "fetch_stream", this);
|
||||
LOG_ERROR("fetch log fail on rpc, need_switch_server", K(svr_), K(rcode), "fetch_stream", this);
|
||||
}
|
||||
// server return error
|
||||
else if (OB_SUCCESS != resp.get_err()) {
|
||||
// Other errors, switch server directly
|
||||
need_kick_out = true;
|
||||
kick_out_reason = FETCH_LOG_FAIL_ON_SERVER;
|
||||
LOG_ERROR("fetch log fail on server", "fetch_stream", this, K(svr_),
|
||||
LOG_ERROR("fetch log fail on server, need_switch_server", "fetch_stream", this, K(svr_),
|
||||
"svr_err", resp.get_err(), "svr_debug_err", resp.get_debug_err(),
|
||||
K(rcode), K(resp));
|
||||
} else {
|
||||
|
@ -103,6 +103,7 @@ public:
|
||||
const int64_t prealloc_page_count)
|
||||
{
|
||||
int ret = common::OB_SUCCESS;
|
||||
const int64_t start_ts = get_timestamp();
|
||||
if (OB_UNLIKELY(inited_)) {
|
||||
ret = common::OB_INIT_TWICE;
|
||||
OBLOG_LOG(WARN, "already init", KR(ret));
|
||||
@ -128,8 +129,10 @@ public:
|
||||
} else {
|
||||
task_large_allocator_.set_label(common::ObModIds::OB_LOG_PART_TRANS_TASK_LARGE);
|
||||
allow_dynamic_alloc_ = allow_dynamic_alloc;
|
||||
const int64_t cost_ts_usec = get_timestamp() - start_ts;
|
||||
inited_ = true;
|
||||
OBLOG_LOG(INFO, "task_pool init success");
|
||||
OBLOG_LOG(INFO, "task_pool init success", K(prealloc_page_count), K(prealloc_pool_size),
|
||||
K(trans_task_page_size), K(cost_ts_usec));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -59,6 +59,22 @@ private:
|
||||
int64_t bar_;
|
||||
};
|
||||
|
||||
TEST(ObLogTransTaskPool, Init)
|
||||
{
|
||||
const int64_t part_trans_task_prealloc_count = 300000;
|
||||
const int64_t page_size = 8 * 1024;
|
||||
const int64_t prealloc_page_count = 20000;
|
||||
|
||||
ObConcurrentFIFOAllocator fifo;
|
||||
int64_t G = 1024 * 1024 * 1024;
|
||||
fifo.init(1 * G, 1 * G, OB_MALLOC_BIG_BLOCK_SIZE);
|
||||
|
||||
ObLogTransTaskPool<MockTransTask> pool;
|
||||
|
||||
int ret = pool.init(&fifo, part_trans_task_prealloc_count, page_size, true, prealloc_page_count);
|
||||
EXPECT_EQ(OB_SUCCESS, ret);
|
||||
}
|
||||
|
||||
TEST(ObLogTransTaskPool, Function1)
|
||||
{
|
||||
const int64_t task_cnt = 1024 * 32;
|
||||
|
Loading…
x
Reference in New Issue
Block a user