code: @Override
    public Set<DataSegment> announceHistoricalSegments(final Set<DataSegment> segments) throws IOException
    {
      final SegmentPublishResult result = announceHistoricalSegments(segments, null, null);
  
      // Metadata transaction cannot fail because we are not trying to do one.
      if (!result.isSuccess()) {
        throw new ISE("WTF?! announceHistoricalSegments failed with null metadata, should not happen.");
      }
  
      return result.getSegments();
    }
docs: Attempts to insert a set of segments to the database. Returns the set of segments actually added (segments
  with identifiers already in the database will not be added).
  
  @param segments set of segments to add
  
  @return set of segments actually added