diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 925ff32cb55c297e2b8d0a793f63751ab8876826..9a97c773c4bad80955aed39e659a0b57666d5e0a 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -282,6 +282,8 @@ int32_t tsdbConfigRepo(TsdbRepoT *repo, STsdbCfg *pCfg) { int32_t tsdbTriggerCommit(TsdbRepoT *repo) { STsdbRepo *pRepo = (STsdbRepo *)repo; + + if (pRepo->appH.walCallBack) pRepo->appH.walCallBack(pRepo->appH.appH); tsdbLockRepo(repo); if (pRepo->commit) { @@ -854,8 +856,6 @@ static void *tsdbCommitData(void *arg) { SRWHelper whelper = {0}; if (pCache->imem == NULL) return NULL; - if (pRepo->appH.walCallBack) pRepo->appH.walCallBack(pRepo->appH.appH); - // Create the iterator to read from cache SSkipListIterator **iters = tsdbCreateTableIters(pMeta, pCfg->maxTables); if (iters == NULL) {