提交 6ee68331 编写于 作者: dengyihao's avatar dengyihao

update DEFAULT_BUFF

上级 449051cd
...@@ -87,8 +87,6 @@ void* streamBackendInit(const char* path) { ...@@ -87,8 +87,6 @@ void* streamBackendInit(const char* path) {
pHandle->cfInst = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK); pHandle->cfInst = taosHashInit(64, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY), false, HASH_NO_LOCK);
rocksdb_env_t* env = rocksdb_create_default_env(); // rocksdb_envoptions_create(); rocksdb_env_t* env = rocksdb_create_default_env(); // rocksdb_envoptions_create();
rocksdb_env_set_low_priority_background_threads(env, 4);
rocksdb_env_set_high_priority_background_threads(env, 2);
rocksdb_cache_t* cache = rocksdb_cache_create_lru(64 << 20); rocksdb_cache_t* cache = rocksdb_cache_create_lru(64 << 20);
...@@ -577,6 +575,11 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) { ...@@ -577,6 +575,11 @@ int32_t decodeValueFunc(void* value, int32_t vlen, int64_t* ttl, char** dest) {
int64_t now = taosGetTimestampMs(); int64_t now = taosGetTimestampMs();
p = taosDecodeFixedI64(p, &key.unixTimestamp); p = taosDecodeFixedI64(p, &key.unixTimestamp);
p = taosDecodeFixedI32(p, &key.len); p = taosDecodeFixedI32(p, &key.len);
if (vlen != sizeof(int64_t) + sizeof(int32_t) + key.len) {
*dest = NULL;
return -1;
}
if (key.len == 0) { if (key.len == 0) {
key.data = NULL; key.data = NULL;
} else { } else {
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
#include "ttime.h" #include "ttime.h"
#define DEFAULT_FALSE_POSITIVE 0.01 #define DEFAULT_FALSE_POSITIVE 0.01
#define DEFAULT_BUCKET_SIZE 1310720 #define DEFAULT_BUCKET_SIZE 131072
#define DEFAULT_MAP_CAPACITY 1310720 #define DEFAULT_MAP_CAPACITY 131072
#define DEFAULT_MAP_SIZE (DEFAULT_MAP_CAPACITY * 10) #define DEFAULT_MAP_SIZE (DEFAULT_MAP_CAPACITY * 100)
#define ROWS_PER_MILLISECOND 1 #define ROWS_PER_MILLISECOND 1
#define MAX_NUM_SCALABLE_BF 100000 #define MAX_NUM_SCALABLE_BF 100000
#define MIN_NUM_SCALABLE_BF 10 #define MIN_NUM_SCALABLE_BF 10
...@@ -44,8 +44,8 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) { ...@@ -44,8 +44,8 @@ static void windowSBfAdd(SUpdateInfo *pInfo, uint64_t count) {
} }
} }
static void clearItemHelper(void* p) { static void clearItemHelper(void *p) {
SScalableBf** pBf = p; SScalableBf **pBf = p;
tScalableBfDestroy(*pBf); tScalableBfDestroy(*pBf);
} }
...@@ -274,7 +274,7 @@ void updateInfoDestoryColseWinSBF(SUpdateInfo *pInfo) { ...@@ -274,7 +274,7 @@ void updateInfoDestoryColseWinSBF(SUpdateInfo *pInfo) {
} }
int32_t updateInfoSerialize(void *buf, int32_t bufLen, const SUpdateInfo *pInfo) { int32_t updateInfoSerialize(void *buf, int32_t bufLen, const SUpdateInfo *pInfo) {
if(!pInfo) { if (!pInfo) {
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册