Use master to get remotes to avoid race conditions in cloud (#31221)
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Этот коммит содержится в:
коммит произвёл
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")
|
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 {
|
if err != sql.ErrNoRows {
|
||||||
return nil, errors.Wrapf(err, "failed to get shared channel remotes for channel_id=%s; remote_id=%s",
|
return nil, errors.Wrapf(err, "failed to get shared channel remotes for channel_id=%s; remote_id=%s",
|
||||||
opts.ChannelId, opts.RemoteId)
|
opts.ChannelId, opts.RemoteId)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user