Merge pull request #6777 from taosdata/fix/TD-4705

[TD-4705]<fix>: disallow file sync starting when vnode closing
This commit is contained in:
Shengliang Guan 2021-07-07 15:00:18 +08:00 committed by GitHub
commit d3e3a34308
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ void vnodeCtrlFlow(int32_t vgId, int32_t level) {
}
void vnodeStartSyncFile(int32_t vgId) {
SVnodeObj *pVnode = vnodeAcquire(vgId);
SVnodeObj *pVnode = vnodeAcquireNotClose(vgId);
if (pVnode == NULL) {
vError("vgId:%d, vnode not found while start filesync", vgId);
return;
@ -155,7 +155,7 @@ int32_t vnodeWriteToCache(int32_t vgId, void *wparam, int32_t qtype, void *rpara
}
int32_t vnodeGetVersion(int32_t vgId, uint64_t *fver, uint64_t *wver) {
SVnodeObj *pVnode = vnodeAcquire(vgId);
SVnodeObj *pVnode = vnodeAcquireNotClose(vgId);
if (pVnode == NULL) {
vError("vgId:%d, vnode not found while write to cache", vgId);
return -1;