Merge pull request #6229 from taosdata/hotfix/TD-4323

[TD-4323]<fix>:  the deleted vnode does not need to commit, so as to …
This commit is contained in:
Shengliang Guan 2021-05-26 09:13:21 +08:00 committed by GitHub
commit f3ae6fb57f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -419,7 +419,11 @@ void vnodeDestroy(SVnodeObj *pVnode) {
}
if (pVnode->tsdb) {
code = tsdbCloseRepo(pVnode->tsdb, 1);
// the deleted vnode does not need to commit, so as to speed up the deletion
int toCommit = 1;
if (pVnode->dropped) toCommit = 0;
code = tsdbCloseRepo(pVnode->tsdb, toCommit);
pVnode->tsdb = NULL;
}