[MM-58355] Send invalidate cache message across the cluster so that websocket connections on other instances are invalidated correctly (#27204)
* [MM-58355] Send invalidate cache message across the cluster so that websocket connections on other instances are invalidated correctly * Add suggestion to clear the session cache on the local node as well * Force read from master DB when gettting channel members for websocket to avoid any DB sync issues * PR feedback * Missed generated files
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
91741a7fa4
Коммит
f3e760008c
@@ -1070,11 +1070,11 @@ func (s *RetryLayerChannelStore) GetAllChannelMemberIdsByChannelId(id string) ([
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerChannelStore) GetAllChannelMembersForUser(userID string, allowFromCache bool, includeDeleted bool) (map[string]string, error) {
|
||||
func (s *RetryLayerChannelStore) GetAllChannelMembersForUser(ctx request.CTX, userID string, allowFromCache bool, includeDeleted bool) (map[string]string, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.ChannelStore.GetAllChannelMembersForUser(userID, allowFromCache, includeDeleted)
|
||||
result, err := s.ChannelStore.GetAllChannelMembersForUser(ctx, userID, allowFromCache, includeDeleted)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
@@ -13154,11 +13154,11 @@ func (s *RetryLayerUserStore) GetAllProfiles(options *model.UserGetOptions) ([]*
|
||||
|
||||
}
|
||||
|
||||
func (s *RetryLayerUserStore) GetAllProfilesInChannel(ctx context.Context, channelID string, allowFromCache bool) (map[string]*model.User, error) {
|
||||
func (s *RetryLayerUserStore) GetAllProfilesInChannel(rctx context.Context, channelID string, allowFromCache bool) (map[string]*model.User, error) {
|
||||
|
||||
tries := 0
|
||||
for {
|
||||
result, err := s.UserStore.GetAllProfilesInChannel(ctx, channelID, allowFromCache)
|
||||
result, err := s.UserStore.GetAllProfilesInChannel(rctx, channelID, allowFromCache)
|
||||
if err == nil {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user