From 6adf7532a824b98052733048b7b2b5de31f8472e Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 10 Oct 2023 11:35:18 +0800 Subject: [PATCH] add sess iter --- source/libs/stream/src/streamBackendRocksdb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index dde2354abe..0cb9ba4aee 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -2178,12 +2178,11 @@ int32_t streamStateSessionDel_rocksdb(SStreamState* pState, const SSessionKey* k SStreamStateCur* streamStateSessionSeekToLast_rocksdb(SStreamState* pState, const SSessionKey* key) { qDebug("streamStateSessionSeekToLast_rocksdb"); - SSessionKey maxSessionKey = {.groupId = UINT64_MAX, .win = {.skey = INT64_MAX, .ekey = INT64_MAX}}; + int32_t code = 0; + SSessionKey maxSessionKey = {.groupId = UINT64_MAX, .win = {.skey = INT64_MAX, .ekey = INT64_MAX}}; SStateSessionKey maxKey = {.key = maxSessionKey, .opNum = INT64_MAX}; - int32_t code = 0; - // int32_t klen = stateSessionKeyEncode((void*)&maxKey, buf); STREAM_STATE_PUT_ROCKSDB(pState, "sess", &maxKey, "", 0); if (code != 0) { return NULL; @@ -2334,6 +2333,7 @@ SStreamStateCur* streamStateSessionSeekKeyNext_rocksdb(SStreamState* pState, con } return pCur; } + int32_t streamStateSessionGetKVByCur_rocksdb(SStreamStateCur* pCur, SSessionKey* pKey, void** pVal, int32_t* pVLen) { qDebug("streamStateSessionGetKVByCur_rocksdb"); if (!pCur) {