提交 2f57c843 编写于 作者: H Hongze Cheng

more fix

上级 e79fe91b
...@@ -872,7 +872,11 @@ int32_t tsdbFSWaitAllBgTask(STFileSystem *fs) { ...@@ -872,7 +872,11 @@ int32_t tsdbFSWaitAllBgTask(STFileSystem *fs) {
} }
static int32_t tsdbFSDoDisableBgTask(STFileSystem *fs) { static int32_t tsdbFSDoDisableBgTask(STFileSystem *fs) {
// TODO fs->stop = true;
if (fs->bgTaskRunning) {
tsdbDoWaitBgTask(fs, fs->bgTaskRunning);
}
return 0; return 0;
} }
...@@ -884,6 +888,8 @@ int32_t tsdbFSDisableBgTask(STFileSystem *fs) { ...@@ -884,6 +888,8 @@ int32_t tsdbFSDisableBgTask(STFileSystem *fs) {
} }
int32_t tsdbFSEnableBgTask(STFileSystem *fs) { int32_t tsdbFSEnableBgTask(STFileSystem *fs) {
// TODO taosThreadMutexLock(fs->mutex);
fs->stop = false;
taosThreadMutexUnlock(fs->mutex);
return 0; return 0;
} }
\ No newline at end of file
...@@ -1025,6 +1025,8 @@ int32_t tsdbSnapWriterOpen(STsdb* pTsdb, int64_t sver, int64_t ever, STsdbSnapWr ...@@ -1025,6 +1025,8 @@ int32_t tsdbSnapWriterOpen(STsdb* pTsdb, int64_t sver, int64_t ever, STsdbSnapWr
code = tsdbFSCreateCopySnapshot(pTsdb->pFS, &writer[0]->fsetArr); code = tsdbFSCreateCopySnapshot(pTsdb->pFS, &writer[0]->fsetArr);
TSDB_CHECK_CODE(code, lino, _exit); TSDB_CHECK_CODE(code, lino, _exit);
tsdbFSDisableBgTask(pTsdb->pFS);
_exit: _exit:
if (code) { if (code) {
tsdbError("vgId:%d %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, lino, tstrerror(code)); tsdbError("vgId:%d %s failed at line %d since %s", TD_VID(pTsdb->pVnode), __func__, lino, tstrerror(code));
...@@ -1075,6 +1077,7 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** writer, int8_t rollback) { ...@@ -1075,6 +1077,7 @@ int32_t tsdbSnapWriterClose(STsdbSnapWriter** writer, int8_t rollback) {
taosThreadRwlockUnlock(&writer[0]->tsdb->rwLock); taosThreadRwlockUnlock(&writer[0]->tsdb->rwLock);
} }
tsdbFSEnableBgTask(tsdb->pFS);
tsdbIterMergerClose(&writer[0]->ctx->tombIterMerger); tsdbIterMergerClose(&writer[0]->ctx->tombIterMerger);
tsdbIterMergerClose(&writer[0]->ctx->dataIterMerger); tsdbIterMergerClose(&writer[0]->ctx->dataIterMerger);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册