提交 242e8246 编写于 作者: L Liu Jicong

make wal cleanup called once for each init

上级 dc245929
...@@ -68,9 +68,12 @@ int32_t walInit() { ...@@ -68,9 +68,12 @@ int32_t walInit() {
} }
void walCleanUp() { void walCleanUp() {
int old = atomic_val_compare_exchange_8(&tsWal.inited, 1, 0);
if(old == 0) {
return;
}
walStopThread(); walStopThread();
taosCloseRef(tsWal.refSetId); taosCloseRef(tsWal.refSetId);
atomic_store_8(&tsWal.inited, 0);
wInfo("wal module is cleaned up"); wInfo("wal module is cleaned up");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册