diff --git a/go.mod b/go.mod index 4086b2c717..a7c88b1f97 100644 --- a/go.mod +++ b/go.mod @@ -34,7 +34,7 @@ require ( github.com/opentracing/opentracing-go v1.2.0 github.com/prometheus/client_golang v1.17.0 github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 - github.com/redis/go-redis/v9 v9.3.0 + github.com/redis/go-redis/v9 v9.3.1 github.com/sarslanhan/cronmask v0.0.0-20230801193303-54e29300a091 github.com/sirupsen/logrus v1.9.3 github.com/sony/gobreaker v0.5.0 diff --git a/go.sum b/go.sum index 75a5ae7ced..03f0faa9be 100644 --- a/go.sum +++ b/go.sum @@ -356,6 +356,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/redis/go-redis/v9 v9.3.0 h1:RiVDjmig62jIWp7Kk4XVLs0hzV6pI3PyTnnL0cnn0u0= github.com/redis/go-redis/v9 v9.3.0/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= +github.com/redis/go-redis/v9 v9.3.1 h1:KqdY8U+3X6z+iACvumCNxnoluToB+9Me+TvyFa21Mds= +github.com/redis/go-redis/v9 v9.3.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= diff --git a/net/redisclient.go b/net/redisclient.go index 14f6193145..296a2e3d2d 100644 --- a/net/redisclient.go +++ b/net/redisclient.go @@ -4,6 +4,7 @@ import ( "context" "fmt" "log" + "strconv" "sync" "time" @@ -401,7 +402,7 @@ func (r *RedisRingClient) Set(ctx context.Context, key string, value interface{} } func (r *RedisRingClient) ZAdd(ctx context.Context, key string, val int64, score float64) (int64, error) { - res := r.ring.ZAdd(ctx, key, redis.Z{Member: val, Score: score}) + res := r.ring.ZAdd(ctx, key, redis.Z{Member: strconv.FormatInt(val, 10), Score: score}) return res.Val(), res.Err() }