From e48e485b6c71165a1546cbdf4ecef37b9e599225 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 2 Jun 2023 11:56:24 +0000 Subject: [PATCH] update default buffer --- source/libs/stream/src/streamBackendRocksdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index e07198f6ab..5be6d1b003 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -572,11 +572,10 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) { *dest = NULL; return -1; } - int64_t now = taosGetTimestampMs(); p = taosDecodeFixedI64(p, &key.unixTimestamp); p = taosDecodeFixedI32(p, &key.len); if (vlen != sizeof(int64_t) + sizeof(int32_t) + key.len) { - *dest = NULL; + if (dest != NULL) *dest = NULL; return -1; } @@ -587,6 +586,7 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) { } if (ttl != NULL) { + int64_t now = taosGetTimestampMs(); *ttl = key.unixTimestamp == 0 ? 0 : key.unixTimestamp - now; } if (dest != NULL) {