code: private CompletableFuture<TableWriterFlushResult> flushWithSingleRetry(DirectSegmentAccess segment, TimeoutTimer timer) {
          return Futures.exceptionallyComposeExpecting(
                  flushOnce(segment, timer),
                  this::canRetryFlushException,
                  () -> {
                      reconcileTableIndexOffset();
                      return flushOnce(segment, timer);
                  });
      }
docs: Performs a flush attempt, and retries it in case it failed with {@link BadAttributeUpdateException} for the
  {@link TableAttributes#INDEX_OFFSET} attribute.
  
  In case of a retry, it reconciles the cached value for the {@link TableAttributes#INDEX_OFFSET} attribute and
  updates any internal state.
  
  @param segment A {@link DirectSegmentAccess} representing the Segment to flush on.
  @param timer   Timer for the operation.
  @return A CompletableFuture that, when completed, will indicate the flush has completed successfully. If the
  operation failed, it will be failed with the appropriate exception. Notable exceptions:
  <ul>
  <li>{@link BadAttributeUpdateException} If a conditional update on the {@link TableAttributes#INDEX_OFFSET} attribute
  failed (for the second attempt) or on any other attribute failed (for any attempt).
  <li>{@link DataCorruptionException} If the reconciliation failed (in which case no flush is attempted.
  </ul>