From 8d24f8b46b3c544fef33427ca1f2582d92c59dd4 Mon Sep 17 00:00:00 2001 From: "zhaozhao.zz" Date: Thu, 6 Sep 2018 20:52:05 +0800 Subject: [PATCH] Scripting & Streams: some commands need right flags xadd with id * generates random stream id xadd & xtrim with approximate maxlen count may trim stream randomly xinfo may get random radix-tree-keys/nodes xpending may get random idletime xclaim: master and slave may have different idletime in stream --- src/server.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/server.c b/src/server.c index af5bef7f..b65d69a1 100644 --- a/src/server.c +++ b/src/server.c @@ -306,7 +306,7 @@ struct redisCommand redisCommandTable[] = { {"pfcount",pfcountCommand,-2,"r",0,NULL,1,-1,1,0,0}, {"pfmerge",pfmergeCommand,-2,"wm",0,NULL,1,-1,1,0,0}, {"pfdebug",pfdebugCommand,-3,"w",0,NULL,0,0,0,0,0}, - {"xadd",xaddCommand,-5,"wmF",0,NULL,1,1,1,0,0}, + {"xadd",xaddCommand,-5,"wmFR",0,NULL,1,1,1,0,0}, {"xrange",xrangeCommand,-4,"r",0,NULL,1,1,1,0,0}, {"xrevrange",xrevrangeCommand,-4,"r",0,NULL,1,1,1,0,0}, {"xlen",xlenCommand,2,"rF",0,NULL,1,1,1,0,0}, @@ -314,11 +314,11 @@ struct redisCommand redisCommandTable[] = { {"xreadgroup",xreadCommand,-7,"ws",0,xreadGetKeys,1,1,1,0,0}, {"xgroup",xgroupCommand,-2,"wm",0,NULL,2,2,1,0,0}, {"xack",xackCommand,-4,"wF",0,NULL,1,1,1,0,0}, - {"xpending",xpendingCommand,-3,"r",0,NULL,1,1,1,0,0}, - {"xclaim",xclaimCommand,-6,"wF",0,NULL,1,1,1,0,0}, - {"xinfo",xinfoCommand,-2,"r",0,NULL,2,2,1,0,0}, + {"xpending",xpendingCommand,-3,"rR",0,NULL,1,1,1,0,0}, + {"xclaim",xclaimCommand,-6,"wRF",0,NULL,1,1,1,0,0}, + {"xinfo",xinfoCommand,-2,"rR",0,NULL,2,2,1,0,0}, {"xdel",xdelCommand,-3,"wF",0,NULL,1,1,1,0,0}, - {"xtrim",xtrimCommand,-2,"wF",0,NULL,1,1,1,0,0}, + {"xtrim",xtrimCommand,-2,"wFR",0,NULL,1,1,1,0,0}, {"post",securityWarningCommand,-1,"lt",0,NULL,0,0,0,0,0}, {"host:",securityWarningCommand,-1,"lt",0,NULL,0,0,0,0,0}, {"latency",latencyCommand,-2,"aslt",0,NULL,0,0,0,0,0}