From 3172306f65347a9be671e3d81b08750279d5421f Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 26 Jun 2023 16:38:26 +0800 Subject: [PATCH] more fix --- source/dnode/vnode/src/tsdb/tsdbFS2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbFS2.c b/source/dnode/vnode/src/tsdb/tsdbFS2.c index bdcfae4d43..8f7213323c 100644 --- a/source/dnode/vnode/src/tsdb/tsdbFS2.c +++ b/source/dnode/vnode/src/tsdb/tsdbFS2.c @@ -781,6 +781,10 @@ static int32_t tsdbFSRunBgTask(void *arg) { static int32_t tsdbFSScheduleBgTaskImpl(STFileSystem *fs, EFSBgTaskT type, int32_t (*run)(void *), void *arg, int64_t *taskid) { + if (fs->stop) { + return 0; // TODO: use a better error code + } + // check if same task is on if (fs->bgTaskRunning && fs->bgTaskRunning->type == type) { return 0;