From 598d8deb4326c3e5736988cf0fed6f6f9659ad39 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Tue, 26 Apr 2022 02:04:39 +0000 Subject: [PATCH] fix TSDB commit problem --- source/dnode/vnode/src/tsdb/tsdbCommit.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/dnode/vnode/src/tsdb/tsdbCommit.c b/source/dnode/vnode/src/tsdb/tsdbCommit.c index 22f4c0211a..f5483b1141 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCommit.c +++ b/source/dnode/vnode/src/tsdb/tsdbCommit.c @@ -142,12 +142,13 @@ int tsdbPrepareCommit(STsdb *pTsdb) { } int tsdbCommit(STsdb *pRepo) { - STsdbMemTable *pMem = pRepo->imem; - SCommitH commith = {0}; - SDFileSet *pSet = NULL; - int fid; + SCommitH commith = {0}; + SDFileSet *pSet = NULL; + int fid; - if (pRepo->imem == NULL) return 0; + // if (pRepo->imem == NULL) return 0; + pRepo->imem = pRepo->mem; + pRepo->mem = NULL; tsdbStartCommit(pRepo); // Resource initialization