private CompletableFuture < Long > submitAssignmentWithRetry ( SegmentInfo segmentInfo , Duration timeout ) { return retryWithCleanup ( ( ) -> submitAssignment ( segmentInfo , false , timeout ) ) ; }
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 .