提交 198dac00 编写于 作者: O obdev 提交者: ob-robot

[CP] Optimize get store lock performance.

上级 09be0109
......@@ -1450,6 +1450,17 @@ int ObTmpFileStore::get_store(const uint64_t tenant_id, ObTmpTenantFileStoreHand
ret = OB_NOT_INIT;
STORAGE_LOG(WARN, "ObTmpFileStore has not been inited", K(ret), K(tenant_id));
} else {
SpinRLockGuard guard(lock_);
if (OB_FAIL(tenant_file_stores_.get_refactored(tenant_id, handle))) {
if (OB_HASH_NOT_EXIST == ret) {
STORAGE_LOG(DEBUG, "ObTmpFileStore get tenant store failed", K(ret), K(tenant_id));
} else {
STORAGE_LOG(WARN, "ObTmpFileStore get tenant store failed", K(ret), K(tenant_id));
}
}
}
if (OB_UNLIKELY(OB_HASH_NOT_EXIST == ret)) {
SpinWLockGuard guard(lock_);
if (OB_FAIL(tenant_file_stores_.get_refactored(tenant_id, handle))) {
if (OB_HASH_NOT_EXIST == ret) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册