code: func (sto *replicaStorage) StatBlobs(ctx context.Context, blobs []blob.Ref, fn func(blob.SizedRef) error) error {
  	var (
  		mu     sync.Mutex // serializes calls to fn, guards need
  		need   = make(map[blob.Ref]bool)
  		failed bool
  	)
  	for _, br := range blobs {
  		need[br] = true
  	}
  
  	group, ctx := errgroup.WithContext(ctx)
  
  	for _, replica := range sto.readReplicas {
  		replica := replica
  		group.Go(func() error {
  			return replica.StatBlobs(ctx, blobs, func(sb blob.SizedRef) error {
  				mu.Lock()
  				defer mu.Unlock()
  				if failed {
  					return nil
  				}
  				if !need[sb.Ref] {
  					// dup, lost race from other replica
  					return nil
  				}
  				delete(need, sb.Ref)
  				if err := fn(sb); err != nil {
  					failed = true
  					return err
  				}
  				return nil
  			})
  		})
  	}
  
  	return group.Wait()
  }
docs: // StatBlobs stats all read replicas.