diff --git a/src/tsdb/src/tsdbMain.c b/src/tsdb/src/tsdbMain.c index d5f703ab0fbc75cb943b0ea1418ca87b5a159710..7375a35796161251bf0f7c07e64920fe75205396 100644 --- a/src/tsdb/src/tsdbMain.c +++ b/src/tsdb/src/tsdbMain.c @@ -867,6 +867,8 @@ static void *tsdbCommitData(void *arg) { SRWHelper whelper = {0}; if (pCache->imem == NULL) return NULL; + pRepo->appH.walCallBack(pRepo->appH.appH); + // Create the iterator to read from cache SSkipListIterator **iters = tsdbCreateTableIters(pMeta, pCfg->maxTables); if (iters == NULL) { diff --git a/src/tsdb/src/tsdbRWHelper.c b/src/tsdb/src/tsdbRWHelper.c index da3c55bbf9e68b20bb18b1379dc3905deff8c6f6..9c35ebb40fbcfe4a5e98f107ce71bad341562089 100644 --- a/src/tsdb/src/tsdbRWHelper.c +++ b/src/tsdb/src/tsdbRWHelper.c @@ -67,7 +67,7 @@ static void tsdbResetHelperTableImpl(SRWHelper *pHelper) { static void tsdbResetHelperTable(SRWHelper *pHelper) { tsdbResetHelperBlock(pHelper); tsdbResetHelperTableImpl(pHelper); - helperClearState(pHelper, TSDB_HELPER_TABLE_SET); + helperClearState(pHelper, (TSDB_HELPER_TABLE_SET|TSDB_HELPER_INFO_LOAD)); } static void tsdbInitHelperTable(SRWHelper *pHelper) { @@ -83,7 +83,8 @@ static void tsdbResetHelperBlockImpl(SRWHelper *pHelper) { } static void tsdbResetHelperBlock(SRWHelper *pHelper) { - // TODO + tsdbResetHelperBlockImpl(pHelper); + // helperClearState(pHelper, TSDB_HELPER_) } static int tsdbInitHelperBlock(SRWHelper *pHelper) { @@ -264,7 +265,7 @@ void tsdbSetHelperTable(SRWHelper *pHelper, STable *pTable, STsdbRepo *pRepo) { // Clear members and state used by previous table tsdbResetHelperTable(pHelper); - ASSERT(pHelper->state == (TSDB_HELPER_FILE_SET_AND_OPEN | TSDB_HELPER_IDX_LOAD)); + ASSERT(helperHasState(pHelper, (TSDB_HELPER_FILE_SET_AND_OPEN | TSDB_HELPER_IDX_LOAD))); pHelper->tableInfo.tid = pTable->tableId.tid; pHelper->tableInfo.uid = pTable->tableId.uid;