From 6a69c56b32febe446631d86b57860e2559b83d2e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 7 Aug 2023 10:55:42 +0000 Subject: [PATCH] support reopen stream state --- source/libs/stream/src/streamBackendRocksdb.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index c63942c8cc..54b0e8498e 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -487,15 +487,15 @@ int32_t streamBackendLoadCheckpointInfo(void* arg) { int32_t code = 0; int32_t len = strlen(pMeta->path) + 30; - char* checkpointPath = taosMemoryCalloc(1, len); - sprintf(checkpointPath, "%s%s%s", pMeta->path, TD_DIRSEP, "checkpoints"); + char* chkpPath = taosMemoryCalloc(1, len); + sprintf(chkpPath, "%s%s%s", pMeta->path, TD_DIRSEP, "checkpoints"); - if (!taosDirExist(checkpointPath)) { + if (!taosDirExist(chkpPath)) { // no checkpoint, nothing to load return 0; } - TdDirPtr pDir = taosOpenDir(checkpointPath); + TdDirPtr pDir = taosOpenDir(chkpPath); if (pDir == NULL) return 0; TdDirEntryPtr de = NULL; @@ -525,7 +525,7 @@ int32_t streamBackendLoadCheckpointInfo(void* arg) { taosArrayDestroy(suffix); taosCloseDir(&pDir); - taosMemoryFree(checkpointPath); + taosMemoryFree(chkpPath); return 0; } int32_t streamBackendDoCheckpoint(void* arg, uint64_t checkpointId) {