fix: cannot close mnode while transferring snapshot
This commit is contained in:
parent
b6d3d2322c
commit
82bc543ed7
|
@ -491,6 +491,15 @@ void mndPreClose(SMnode *pMnode) {
|
|||
if (pMnode != NULL) {
|
||||
syncLeaderTransfer(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) {
|
|||
syncPreStop(pVnode->sync);
|
||||
|
||||
while (!syncSnapshotRecving(pVnode->sync)) {
|
||||
vInfo("vgId:%s, snapshot is recving");
|
||||
vInfo("vgId:%d, snapshot is recving", pVnode->config.vgId);
|
||||
taosMsleep(300);
|
||||
}
|
||||
while (!syncSnapshotSending(pVnode->sync)) {
|
||||
vInfo("vgId:%s, snapshot is sending");
|
||||
vInfo("vgId:%d, snapshot is sending", pVnode->config.vgId);
|
||||
taosMsleep(300);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue