mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-04 03:13:15 +08:00
fix:get max seqs
This commit is contained in:
parent
0f2acd1569
commit
b8ff6ba9fc
8
pkg/common/storage/cache/redis/seq.go
vendored
8
pkg/common/storage/cache/redis/seq.go
vendored
@ -63,10 +63,12 @@ func (c *seqCache) getSeq(ctx context.Context, conversationID string, getkey fun
|
||||
|
||||
func (c *seqCache) getSeqs(ctx context.Context, items []string, getkey func(s string) string) (m map[string]int64, err error) {
|
||||
m = make(map[string]int64, len(items))
|
||||
reverseMap := make(map[string]string, len(items))
|
||||
var lock sync.Mutex
|
||||
var (
|
||||
reverseMap = make(map[string]string, len(items))
|
||||
keys = make([]string, len(items))
|
||||
lock sync.Mutex
|
||||
)
|
||||
|
||||
keys := make([]string, len(items))
|
||||
for i, v := range items {
|
||||
keys[i] = getkey(v)
|
||||
reverseMap[getkey(v)] = v
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user