提交 304544f4 编写于 作者: Y YoungYang0820 提交者: wangzelin.wzl

add retry when tablet autoinc seq -4023

上级 a1f368d6
......@@ -252,6 +252,8 @@ int ObTabletAutoincrementService::get_autoinc_seq(const uint64_t tenant_id, cons
}
if (OB_SUCC(ret)) {
ObTabletCacheInterval interval(tablet_id, 1/*cache size*/);
lib::ObMutex &mutex = init_node_mutexs_[tablet_id.id() % INIT_NODE_MUTEX_NUM];
lib::ObMutexGuard guard(mutex);
if (OB_ISNULL(autoinc_mgr)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("autoinc mgr is unexpected null", K(ret));
......
......@@ -110,7 +110,7 @@ private:
private:
typedef common::ObLinkHashMap<ObTabletAutoincKey, ObTabletAutoincMgr> TabletAutoincMgrMap;
const static int INIT_NODE_MUTEX_NUM = 1024;
const static int INIT_NODE_MUTEX_NUM = 10243L;
bool is_inited_;
common::ObSmallAllocator node_allocator_;
TabletAutoincMgrMap tablet_autoinc_mgr_map_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册