Fix clean sequence cache easy to timeout
This commit is contained in:
@ -142,7 +142,6 @@ int ObSequenceSqlService::clean_sequence_cache(uint64_t tenant_id, uint64_t sequ
|
||||
ObSEArray<ObAddr, 8> server_list;
|
||||
ObSrvRpcProxy srv_rpc_proxy;
|
||||
ObUnitInfoGetter ui_getter;
|
||||
static const int64_t OB_CLEAN_SEQUENCE_CACHE_TIMEOUT = 1000 * 1000; // 1s
|
||||
if (OB_ISNULL(GCTX.sql_proxy_) || OB_ISNULL(GCTX.net_frame_) || OB_ISNULL(GCTX.net_frame_->get_req_transport())) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("sql_proxy or net_frame in GCTX is null", K(GCTX.sql_proxy_), K(GCTX.net_frame_));
|
||||
@ -154,10 +153,11 @@ int ObSequenceSqlService::clean_sequence_cache(uint64_t tenant_id, uint64_t sequ
|
||||
LOG_WARN("fail to init srv rpc proxy", KR(ret));
|
||||
} else {
|
||||
for (int i = 0; OB_SUCC(ret) && i < server_list.count(); ++i) {
|
||||
const uint64_t timeout = THIS_WORKER.get_timeout_remain();
|
||||
if (OB_FAIL(srv_rpc_proxy
|
||||
.to(server_list.at(i))
|
||||
.by(tenant_id)
|
||||
.timeout(OB_CLEAN_SEQUENCE_CACHE_TIMEOUT)
|
||||
.timeout(timeout)
|
||||
.clean_sequence_cache(sequence_id))) {
|
||||
LOG_WARN("clean sequnece cache failed", K(ret), K(sequence_id), K(server_list.at(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user