From ae117bd7c3424d7320a16f34a052fef9126be3f8 Mon Sep 17 00:00:00 2001 From: liuyao <54liuyao@163.com> Date: Wed, 19 Apr 2023 09:14:36 +0800 Subject: [PATCH] fill state --- source/libs/stream/src/streamState.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamState.c b/source/libs/stream/src/streamState.c index 9e49ae9e97..7fa19a9860 100644 --- a/source/libs/stream/src/streamState.c +++ b/source/libs/stream/src/streamState.c @@ -256,8 +256,10 @@ int32_t streamStateBegin(SStreamState* pState) { int32_t streamStateCommit(SStreamState* pState) { #ifdef USE_ROCKSDB - SStreamSnapshot* pShot = getSnapshot(pState->pFileState); - flushSnapshot(pState->pFileState, pShot, true); + if (pState->pFileState) { + SStreamSnapshot* pShot = getSnapshot(pState->pFileState); + flushSnapshot(pState->pFileState, pShot, true); + } return 0; #else if (tdbCommit(pState->pTdbState->db, pState->pTdbState->txn) < 0) {