add retry when tablet autoinc seq -4023
This commit is contained in:
committed by
wangzelin.wzl
parent
a1f368d6b9
commit
304544f46f
@ -252,6 +252,8 @@ int ObTabletAutoincrementService::get_autoinc_seq(const uint64_t tenant_id, cons
|
|||||||
}
|
}
|
||||||
if (OB_SUCC(ret)) {
|
if (OB_SUCC(ret)) {
|
||||||
ObTabletCacheInterval interval(tablet_id, 1/*cache size*/);
|
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)) {
|
if (OB_ISNULL(autoinc_mgr)) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_WARN("autoinc mgr is unexpected null", K(ret));
|
LOG_WARN("autoinc mgr is unexpected null", K(ret));
|
||||||
|
|||||||
@ -110,7 +110,7 @@ private:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
typedef common::ObLinkHashMap<ObTabletAutoincKey, ObTabletAutoincMgr> TabletAutoincMgrMap;
|
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_;
|
bool is_inited_;
|
||||||
common::ObSmallAllocator node_allocator_;
|
common::ObSmallAllocator node_allocator_;
|
||||||
TabletAutoincMgrMap tablet_autoinc_mgr_map_;
|
TabletAutoincMgrMap tablet_autoinc_mgr_map_;
|
||||||
|
|||||||
Reference in New Issue
Block a user