From cee33ffb95a860a5e21fabe3c922b72ced545ca2 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 16 Nov 2023 11:22:18 +0800 Subject: [PATCH] fix stream backend convert --- source/libs/stream/src/streamBackendRocksdb.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index f9bd5476e7..c3196708ee 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -1755,11 +1755,14 @@ int32_t taskDbOpenCfByKey(STaskDbWrapper* pDb, const char* key) { int32_t code = 0; char* err = NULL; int8_t idx = getCfIdx(key); + if (idx == -1) return -1; + if (pDb->pCf[idx] != NULL) return code; + rocksdb_column_family_handle_t* cf = rocksdb_create_column_family(pDb->db, pDb->pCfOpts[idx], ginitDict[idx].key, &err); - if (idx != 0 && err != NULL) { + if (err != NULL) { stError("failed to open cf, key:%s, reason: %s", key, err); taosMemoryFree(err); code = -1;