From c56f29c0310b64a6abf12a23bf3e6c9ae4d2e2b5 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Thu, 15 Jun 2023 17:01:27 +0800 Subject: [PATCH] cache/flushState: init flush state when open cache --- source/dnode/vnode/src/tsdb/tsdbCache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/dnode/vnode/src/tsdb/tsdbCache.c b/source/dnode/vnode/src/tsdb/tsdbCache.c index 72df900a00..5bdcb69e5f 100644 --- a/source/dnode/vnode/src/tsdb/tsdbCache.c +++ b/source/dnode/vnode/src/tsdb/tsdbCache.c @@ -1200,6 +1200,9 @@ int32_t tsdbOpenCache(STsdb *pTsdb) { taosThreadMutexInit(&pTsdb->lruMutex, NULL); + pTsdb->flushState.pTsdb = pTsdb; + pTsdb->flushState.flush_count = 0; + _err: pTsdb->lruCache = pCache; return code; -- GitLab