```release-note
NONE
```

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2022-04-11 20:51:33 +05:30
коммит произвёл GitHub
родитель 16b1cbd6e3
Коммит 7f0d1cf0dd
14 изменённых файлов: 258 добавлений и 3 удалений

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

@@ -9841,6 +9841,27 @@ func (s *RetryLayerTeamStore) GetCommonTeamIDsForTwoUsers(userID string, otherUs
}
func (s *RetryLayerTeamStore) GetMany(ids []string) ([]*model.Team, error) {
tries := 0
for {
result, err := s.TeamStore.GetMany(ids)
if err == nil {
return result, nil
}
if !isRepeatableError(err) {
return result, err
}
tries++
if tries >= 3 {
err = errors.Wrap(err, "giving up after 3 consecutive repeatable transaction failures")
return result, err
}
timepkg.Sleep(100 * timepkg.Millisecond)
}
}
func (s *RetryLayerTeamStore) GetMember(ctx context.Context, teamID string, userID string) (*model.TeamMember, error) {
tries := 0