Hello :wave: I am seeing an error while trying to ...
# troubleshooting
l
Hello 👋 I am seeing an error while trying to reload one of my segments.. Anyone seen this before?
Right I believe I have found the defect
Copy code
// First find servers hosting the segment in a ONLINE state.
      List<URI> peerSegmentURIs = PeerServerSegmentFinder.getPeerServerURIs(segmentName, downloadScheme, _helixManager);
      // Next download the segment from a randomly chosen server using configured scheme.
      SegmentFetcherFactory.getSegmentFetcher(downloadScheme).fetchSegmentToLocal(peerSegmentURIs, segmentTarFile);
This code doesn’t account for peerSegmentURIs being empty
Thus the base segment fetcher will fail on the random call
Copy code
@Override
  public void fetchSegmentToLocal(List<URI> uris, File dest)
      throws Exception {
    if (uris == null) {
      throw new IllegalArgumentException("The input uri list is empty");
    }
    Random r = new Random();
    RetryPolicies.exponentialBackoffRetryPolicy(_retryCount, _retryWaitMs, _retryDelayScaleFactor).attempt(() -> {
      URI uri = uris.get(r.nextInt(uris.size()));
I’ll raise an issue
Or I’ll just fix it
m
Whoa! Thanks so much @Lars-Kristian Svenøy, love it!