Use master to get remotes to avoid race conditions in cloud (#31221)

Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Этот коммит содержится в:
Miguel de la Cruz
2025-06-26 12:52:02 +02:00
коммит произвёл GitHub
родитель 3fb62722a4
Коммит d9a083dc82

Просмотреть файл

@@ -523,7 +523,7 @@ func (s SqlSharedChannelStore) GetRemotes(offset, limit int, opts model.SharedCh
return nil, errors.Wrapf(err, "get_shared_channel_remotes_tosql")
}
if err := s.GetReplica().Select(&remotes, squery, args...); err != nil {
if err := s.GetMaster().Select(&remotes, squery, args...); err != nil {
if err != sql.ErrNoRows {
return nil, errors.Wrapf(err, "failed to get shared channel remotes for channel_id=%s; remote_id=%s",
opts.ChannelId, opts.RemoteId)