* refactor(group): optimize group notification and cache handling
- Improve notification sender with bulk operations and fallback logic
- Enhance group cache with new methods for member counts and version handling
- Refactor group controller with better cache integration
- Add more robust error handling and logging
fix(group): optimize group cache implementation
This commit refactors the GroupCacheRedis implementation to improve code organization and maintainability. The changes include:
- Added proper import organization and removed unused imports
- Implemented batchGetCache2 function calls for efficient data retrieval
- Added comprehensive cache key management functions
- Improved version tracking for group members and requests
- Enhanced error handling and logging
- Added batch operations for better performance
- Refactored complex functions into smaller, more manageable pieces
The changes focus on improving the overall structure and performance of the group cache system while maintaining backward compatibility.
refactor(group): improve notification error handling and add admin context
- Convert notification methods to return errors for better error propagation
- Add admin context checking for bulk notifications
- Enhance group info retrieval with proper error handling
- Improve notification sender with fallback user information
fix(group): handle nil group member map in notification
Add nil check for groupMemberMap[groupInfo.GroupID] before accessing to prevent nil pointer panic. Skip iteration if map is nil.
refactor(group): update group notification methods to use UserInfo struct
Renamed function parameter from groupMemberUserID string to changedUserInfo *sdkws.UserInfo
Updated function logic to use changedUserInfo.UserID instead of separate parameter
Refactored notification methods to use consistent UserInfo struct pattern
Added proper error handling for opUser retrieval
Updated function signatures and internal logic for GroupMemberInfoSetNotificationBulk
fix: batchGetGroupRoleLevelMemberIDs with BatchCache
fix: GetGroupMemberNums BatchCache
perf(group): optimize notification logic for group member operations
# Conflicts:
# internal/rpc/group/group.go
# pkg/common/storage/cache/redis/group.go
* fix: import
* Modify conversation_id index options
Removed the unique constraint from the conversation_id index.
* fix(msggateway): reset read deadline in pong handler to prevent Web client timeout
Root cause:
Due to browser API restrictions, Web (Wasm) clients cannot actively send standard WebSocket Ping frames. They rely entirely on server-initiated Pings (every 27s) and automatic browser Pong responses to maintain the connection. The `pongHandler` was empty and failed to reset the connection's read deadline upon receiving a Pong, causing the server's read loop to strictly time out at 30 seconds.
Solution:
Call `c.setReadDeadline()` inside the `pongHandler` to properly extend the connection's lifespan when a Pong frame is received.
---------
Co-authored-by: OpenIM-Gordon <1432970085@qq.com>
* feat(build): add unified server image build flow
Consolidate service image definitions into a single server build setup, and update CI workflows to use it.
* fix(ci): correct Docker image tag generation
Group conversations store one record per owner_user_id and conversation_id pair, so a global unique index on conversation_id breaks group conversation creation with duplicate key errors.
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* refactor: replace LongConn with ClientConn interface and simplify message handling
* refactor: replace LongConn with ClientConn interface and simplify message handling
* fix: seq use $setOnInsert for min_seq in conversation update
* feat: add error code for handled friend requests and improve error handling in friend operations
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* refactor: replace LongConn with ClientConn interface and simplify message handling
* refactor: replace LongConn with ClientConn interface and simplify message handling
* fix: seq use $setOnInsert for min_seq in conversation update
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* refactor: replace LongConn with ClientConn interface and simplify message handling
* refactor: replace LongConn with ClientConn interface and simplify message handling
* fix: reset user conversation seq when rejoining group to resolve message recall issue
* fix: refactor setMemberJoinSeq based on review feedback
* group: 入群个人上限重置为不受限值;退出个人上限固化;通知控制入群 minSeq
* fix: performance issues with Kafka caused by encapsulating the MQ interface
* fix: admin token in standalone mode
* fix: full id version
* fix: resolve deadlock in cache eviction and improve GetBatch implementation
* feat: implement ratelimit and circuitbreaker in middleware.
* Build: Implement rate limiting and circuit breaker for API and RPC services.
* revert change.
* update ratelimiter and circuitbreaker config.
* update tools to openimsdk tools