未验证 提交 b70bcf30 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #6364 from taosdata/feature/TD-1920

[TD-1920]fix compact bug:sync sdb to disk when compact end
......@@ -95,11 +95,17 @@ static SStep tsDnodeCompactSteps[] = {
{"dnode-minfos", dnodeInitMInfos, dnodeCleanupMInfos},
{"dnode-wal", walInit, walCleanUp},
{"dnode-sync", syncInit, syncCleanUp},
{"dnode-vread", dnodeInitVRead, dnodeCleanupVRead},
{"dnode-vwrite", dnodeInitVWrite, dnodeCleanupVWrite},
{"dnode-vmgmt", dnodeInitVMgmt, dnodeCleanupVMgmt},
{"dnode-mread", dnodeInitMRead, NULL},
{"dnode-mwrite", dnodeInitMWrite, NULL},
{"dnode-mpeer", dnodeInitMPeer, NULL},
{"dnode-vnodes", dnodeInitVnodes, dnodeCleanupVnodes},
{"dnode-modules", dnodeInitModules, dnodeCleanupModules},
{"dnode-mread", NULL, dnodeCleanupMRead},
{"dnode-mwrite", NULL, dnodeCleanupMWrite},
{"dnode-mpeer", NULL, dnodeCleanupMPeer},
};
static int dnodeCreateDir(const char *dir) {
......
......@@ -1176,9 +1176,10 @@ int32_t mnodeCompactWal() {
return -1;
}
// close wal
walFsync(tsSdbMgmt.wal, true);
walClose(tsSdbMgmt.wal);
// close sdb and sync to disk
//walFsync(tsSdbMgmt.wal, true);
//walClose(tsSdbMgmt.wal);
sdbCleanUp();
// rename old wal to wal_bak
if (taosRename(tsMnodeDir, tsMnodeBakDir) != 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册