From 061648071e2b1c07434d6ef7833b778c972f7c84 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Tue, 25 Jun 2024 12:35:25 +0000 Subject: [PATCH] add self check info --- source/libs/stream/src/streamBackendRocksdb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index 2642f608d9..b5ae2ab3dd 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -4270,7 +4270,13 @@ int32_t dbChkpGetDelta(SDbChkp* p, int64_t chkpId, SArray* list) { taosArrayClearP(p->pDel, taosMemoryFree); taosHashClear(p->pSstTbl[1 - p->idx]); - TdDirPtr pDir = taosOpenDir(p->buf); + TdDirPtr pDir = taosOpenDir(p->buf); + if (pDir == NULL) { + terrno = errno; + taosThreadRwlockUnlock(&p->rwLock); + return -1; + } + TdDirEntryPtr de = NULL; int8_t dummy = 0; while ((de = taosReadDir(pDir)) != NULL) {