From 4db9f9189b93f6d9479bee18dbe0884ce43b81c3 Mon Sep 17 00:00:00 2001 From: hzcheng Date: Tue, 21 Apr 2020 18:47:23 +0800 Subject: [PATCH] fix wal call error --- src/tsdb/src/tsdbMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index 925ff32cb5..9a97c773c4 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) { -- GitLab