提交 82bc543e 编写于 作者: S Shengliang Guan

fix: cannot close mnode while transferring snapshot

上级 b6d3d232
...@@ -491,6 +491,15 @@ void mndPreClose(SMnode *pMnode) { ...@@ -491,6 +491,15 @@ void mndPreClose(SMnode *pMnode) {
if (pMnode != NULL) { if (pMnode != NULL) {
syncLeaderTransfer(pMnode->syncMgmt.sync); syncLeaderTransfer(pMnode->syncMgmt.sync);
syncPreStop(pMnode->syncMgmt.sync); syncPreStop(pMnode->syncMgmt.sync);
while (!syncSnapshotRecving(pMnode->syncMgmt.sync)) {
mInfo("vgId:1, snapshot is recving");
taosMsleep(300);
}
while (!syncSnapshotSending(pMnode->syncMgmt.sync)) {
mInfo("vgId:1, snapshot is sending");
taosMsleep(300);
}
} }
} }
......
...@@ -517,11 +517,11 @@ void vnodeSyncPreClose(SVnode *pVnode) { ...@@ -517,11 +517,11 @@ void vnodeSyncPreClose(SVnode *pVnode) {
syncPreStop(pVnode->sync); syncPreStop(pVnode->sync);
while (!syncSnapshotRecving(pVnode->sync)) { while (!syncSnapshotRecving(pVnode->sync)) {
vInfo("vgId:%s, snapshot is recving"); vInfo("vgId:%d, snapshot is recving", pVnode->config.vgId);
taosMsleep(300); taosMsleep(300);
} }
while (!syncSnapshotSending(pVnode->sync)) { while (!syncSnapshotSending(pVnode->sync)) {
vInfo("vgId:%s, snapshot is sending"); vInfo("vgId:%d, snapshot is sending", pVnode->config.vgId);
taosMsleep(300); taosMsleep(300);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册