From 982fed581d3be22708c26103368524f74b4f8980 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Mon, 8 Jul 2024 07:34:06 +0000 Subject: [PATCH] fix invalid read --- source/libs/stream/src/streamBackendRocksdb.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index 8c390c189c..231fc2ce5b 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -1536,15 +1536,10 @@ int32_t chkpLoadExtraInfo(char* pChkpIdDir, int64_t* chkpId, int64_t* processId) pFile = taosOpenFile(pDst, TD_FILE_READ); if (pFile == NULL) { - if (errno == ENOENT) { - // compatible with previous version - *processId = -1; - code = 0; - goto _EXIT; - } else { - code = TAOS_SYSTEM_ERROR(errno); - stError("failed to open file to load extra info, file:%s, reason:%s", pDst, tstrerror(code)); - } + // compatible with previous version + *processId = -1; + code = 0; + stError("failed to open file to load extra info, file:%s, reason:%s", pDst, tstrerror(TAOS_SYSTEM_ERROR(errno))); goto _EXIT; }