From da690eb9c025acc45f7a0249c01faee27a136204 Mon Sep 17 00:00:00 2001 From: yedf2 <120050102@qq.com> Date: Sat, 25 Dec 2021 18:11:38 +0800 Subject: [PATCH] MaySaveNewTrans decode removed --- dtmsvr/storage/redis/redis.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtmsvr/storage/redis/redis.go b/dtmsvr/storage/redis/redis.go index e87cb67..4539829 100644 --- a/dtmsvr/storage/redis/redis.go +++ b/dtmsvr/storage/redis/redis.go @@ -141,19 +141,19 @@ func (s *RedisStore) MaySaveNewTrans(global *storage.TransGlobalStore, branches AppendGid(global.Gid). AppendObject(global). AppendRaw(global.NextCronTime.Unix()). + AppendRaw(global.Gid). AppendBranches(branches) global.Steps = nil global.Payloads = nil _, err := callLua(a, `-- MaySaveNewTrans -local gs = cjson.decode(ARGV[3]) local g = redis.call('GET', KEYS[1]) if g ~= false then return 'UNIQUE_CONFLICT' end redis.call('SET', KEYS[1], ARGV[3], 'EX', ARGV[2]) -redis.call('ZADD', KEYS[3], ARGV[4], gs.gid) -for k = 5, table.getn(ARGV) do +redis.call('ZADD', KEYS[3], ARGV[4], ARGV[5]) +for k = 6, table.getn(ARGV) do redis.call('RPUSH', KEYS[2], ARGV[k]) end redis.call('EXPIRE', KEYS[2], ARGV[2])