MM-43082: Added new telemetry values for groups. (#19918)

Этот коммит содержится в:
mkraft
2022-04-08 11:25:40 -04:00
коммит произвёл GitHub
родитель 1418828443
Коммит 0e4b0b6939
8 изменённых файлов: 96 добавлений и 0 удалений

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

@@ -4750,6 +4750,27 @@ func (s *RetryLayerGroupStore) GroupCount() (int64, error) {
}
func (s *RetryLayerGroupStore) GroupCountBySource(source model.GroupSource) (int64, error) {
tries := 0
for {
result, err := s.GroupStore.GroupCountBySource(source)
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 *RetryLayerGroupStore) GroupCountWithAllowReference() (int64, error) {
tries := 0