mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-17 03:27:02 +08:00
chore: group member hash
This commit is contained in:
parent
2253e95413
commit
e9d784b1b7
5
pkg/common/db/cache/group.go
vendored
5
pkg/common/db/cache/group.go
vendored
@ -19,6 +19,7 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"github.com/OpenIMSDK/tools/log"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -339,7 +340,9 @@ func (g *GroupCacheRedis) GetGroupMembersHash(ctx context.Context, groupID strin
|
|||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
sum := md5.Sum(val)
|
sum := md5.Sum(val)
|
||||||
return binary.BigEndian.Uint64(sum[:]), nil
|
code := binary.BigEndian.Uint64(sum[:])
|
||||||
|
log.ZDebug(ctx, "GetGroupMembersHash", "groupID", groupID, "hashCode", code, "num", len(members))
|
||||||
|
return code, nil
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user