code: private CompletableFuture<Long> submitAssignmentWithRetry(SegmentInfo segmentInfo, Duration timeout) {
          return retryWithCleanup(() -> submitAssignment(segmentInfo, false, timeout));
      }
docs: Same as submitAssignment, but retries exactly once in case TooManyActiveSegmentsException was encountered, in
  which case it forces a metadata cleanup before retrying. If the second attempt also fails, there will be no more retry
  and the Exception from the second failure will be the one that this call fails with too.
  
  @param segmentInfo The SegmentInfo for the Segment to generate and persist.
  @param timeout     Timeout for the operation.
  @return A CompletableFuture that, when completed, will contain the internal SegmentId that was assigned (or the
  one supplied via SegmentInfo, if any). If the operation failed, then this Future will complete with that exception.