code: ListenableFuture<SegmentsAndMetadata> dropInBackground(SegmentsAndMetadata segmentsAndMetadata)
    {
      log.info("Dropping segments[%s]", segmentsAndMetadata.getSegments());
      final ListenableFuture<?> dropFuture = Futures.allAsList(
          segmentsAndMetadata
              .getSegments()
              .stream()
              .map(segment -> appenderator.drop(SegmentIdWithShardSpec.fromDataSegment(segment)))
              .collect(Collectors.toList())
      );
  
      return Futures.transform(
          dropFuture,
          (Function<Object, SegmentsAndMetadata>) x -> {
            final Object metadata = segmentsAndMetadata.getCommitMetadata();
            return new SegmentsAndMetadata(
                segmentsAndMetadata.getSegments(),
                metadata == null ? null : ((AppenderatorDriverMetadata) metadata).getCallerMetadata()
            );
          }
      );
    }
docs: Drop segments in background. The segments should be pushed (in batch ingestion) or published (in streaming
  ingestion) before being dropped.
  
  @param segmentsAndMetadata result of pushing or publishing
  
  @return a future for dropping segments