提交 c47e387d 编写于 作者: S Shengliang Guan

fix: deadlock of mnode if its state changed

上级 b311b873
......@@ -170,12 +170,20 @@ static void mndBecomeFollower(struct SSyncFSM *pFsm) {
SMnode *pMnode = pFsm->data;
mDebug("vgId:1, become follower");
// clear old leader resource
if (pMnode->syncMgmt.transId != 0) {
pMnode->syncMgmt.transId = 0;
tsem_post(&pMnode->syncMgmt.syncSem);
}
}
static void mndBecomeLeader(struct SSyncFSM *pFsm) {
SMnode *pMnode = pFsm->data;
mDebug("vgId:1, become leader");
SMnode *pMnode = pFsm->data;
if (pMnode->syncMgmt.transId != 0) {
pMnode->syncMgmt.transId = 0;
tsem_post(&pMnode->syncMgmt.syncSem);
}
}
SSyncFSM *mndSyncMakeFsm(SMnode *pMnode) {
......
......@@ -210,6 +210,8 @@ if $rows != 3 then
return -1
endi
sql_error select * from performance_schema.PERF_OFFSETS;
sql show create stable stb;
if $rows != 1 then
return -1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册