【重要更新】MAAT Redis事务增加预备主版本号机制,以改善多写入性能,提高配置超时淘汰速度。
This commit is contained in:
@@ -796,9 +796,7 @@ long long _exec_serial_rule_begin(redisContext* ctx)
|
|||||||
{
|
{
|
||||||
long long maat_redis_version=0;
|
long long maat_redis_version=0;
|
||||||
redisReply* data_reply=NULL;
|
redisReply* data_reply=NULL;
|
||||||
data_reply=_wrap_redisCommand(ctx, "WATCH MAAT_VERSION");
|
data_reply=_wrap_redisCommand(ctx, "INCRBY MAAT_PRE_VER 1");
|
||||||
freeReplyObject(data_reply);
|
|
||||||
data_reply=_wrap_redisCommand(ctx, "GET MAAT_VERSION");
|
|
||||||
maat_redis_version=read_redis_integer(data_reply);
|
maat_redis_version=read_redis_integer(data_reply);
|
||||||
maat_redis_version++;
|
maat_redis_version++;
|
||||||
freeReplyObject(data_reply);
|
freeReplyObject(data_reply);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
#include "stream_fuzzy_hash.h"
|
#include "stream_fuzzy_hash.h"
|
||||||
#include "gram_index_engine.h"
|
#include "gram_index_engine.h"
|
||||||
|
|
||||||
int MAAT_FRAME_VERSION_2_1_20180518=1;
|
int MAAT_FRAME_VERSION_2_1_20180523=1;
|
||||||
|
|
||||||
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
|
const char* CHARSET_STRING[]={"NONE","gbk","big5","unicode","utf8","bin",
|
||||||
"unicode_ascii_esc","unicode_ascii_aligned","unicode_ncr_dec","unicode_ncr_hex","url_encode_gb2312","url_encode_utf8",""};
|
"unicode_ascii_esc","unicode_ascii_aligned","unicode_ncr_dec","unicode_ncr_hex","url_encode_gb2312","url_encode_utf8",""};
|
||||||
|
|||||||
@@ -5,5 +5,6 @@ echo "Reseting Redis For Maat..."
|
|||||||
redis-cli -h $host -p $port GET MAAT_VERSION
|
redis-cli -h $host -p $port GET MAAT_VERSION
|
||||||
redis-cli -h $host -p $port FLUSHALL
|
redis-cli -h $host -p $port FLUSHALL
|
||||||
redis-cli -h $host -p $port SET MAAT_VERSION "0"
|
redis-cli -h $host -p $port SET MAAT_VERSION "0"
|
||||||
|
redis-cli -h $host -p $port SET MAAT_PRE_VER "0"
|
||||||
redis-cli -h $host -p $port SET SEQUENCE_REGION "1"
|
redis-cli -h $host -p $port SET SEQUENCE_REGION "1"
|
||||||
redis-cli -h $host -p $port SET SEQUENCE_GROUP "1"
|
redis-cli -h $host -p $port SET SEQUENCE_GROUP "1"
|
||||||
|
|||||||
Reference in New Issue
Block a user