more fix
This commit is contained in:
parent
e79fe91ba0
commit
2f57c8439b
|
@ -872,7 +872,11 @@ int32_t tsdbFSWaitAllBgTask(STFileSystem *fs) {
|
|||
}
|
||||
|
||||
static int32_t tsdbFSDoDisableBgTask(STFileSystem *fs) {
|
||||
// TODO
|
||||
fs->stop = true;
|
||||
|
||||
if (fs->bgTaskRunning) {
|
||||
tsdbDoWaitBgTask(fs, fs->bgTaskRunning);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -884,6 +888,8 @@ int32_t tsdbFSDisableBgTask(STFileSystem *fs) {
|
|||
}
|
||||
|
||||
int32_t tsdbFSEnableBgTask(STFileSystem *fs) {
|
||||
// TODO
|
||||
taosThreadMutexLock(fs->mutex);
|
||||
fs->stop = false;
|
||||
taosThreadMutexUnlock(fs->mutex);
|
||||
return 0;
|
||||
}
|
|
@ -1025,6 +1025,8 @@ int32_t tsdbSnapWriterOpen(STsdb* pTsdb, int64_t sver, int64_t ever, STsdbSnapWr
|
|||
code = tsdbFSCreateCopySnapshot(pTsdb->pFS, &writer[0]->fsetArr);
|
||||
TSDB_CHECK_CODE(code, lino, _exit);
|
||||
|
||||
tsdbFSDisableBgTask(pTsdb->pFS);
|
||||
|
||||
_exit:
|
||||
if (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) {
|
|||
|
||||
taosThreadRwlockUnlock(&writer[0]->tsdb->rwLock);
|
||||
}
|
||||
tsdbFSEnableBgTask(tsdb->pFS);
|
||||
|
||||
tsdbIterMergerClose(&writer[0]->ctx->tombIterMerger);
|
||||
tsdbIterMergerClose(&writer[0]->ctx->dataIterMerger);
|
||||
|
|
Loading…
Reference in New Issue