docs: private static boolean renameIndexFiles(
        final FileSystem outputFS,
        final Path indexZipFilePath,
        final Path finalIndexZipFilePath
    )
    {
      try {
        return RetryUtils.retry(
            () -> {
              final boolean needRename;
  
              if (outputFS.exists(finalIndexZipFilePath)) {
                // NativeS3FileSystem.rename won't overwrite, so we might need to delete the old index first
                final FileStatus zipFile = outputFS.getFileStatus(indexZipFilePath);
                final FileStatus finalIndexZipFile = outputFS.getFileStatus(finalIndexZipFilePath);
  
                if (zipFile.getModificationTime() >= finalIndexZipFile.getModificationTime()
                    || zipFile.getLen() != finalIndexZipFile.getLen()) {
                  log.info(
                      "File[%s / %s / %sB] existed, but wasn't the same as [%s / %s / %sB]",
                      finalIndexZipFile.getPath(),
                      DateTimes.utc(finalIndexZipFile.getModificationTime()),
                      finalIndexZipFile.getLen(),
                      zipFile.getPath(),
                      DateTimes.utc(zipFile.getModificationTime()),
                      zipFile.getLen()
                  );
                  outputFS.delete(finalIndexZipFilePath, false);
                  needRename = true;
                } else {
                  log.info(
                      "File[%s / %s / %sB] existed and will be kept",
                      finalIndexZipFile.getPath(),
                      DateTimes.utc(finalIndexZipFile.getModificationTime()),
                      finalIndexZipFile.getLen()
                  );
                  needRename = false;
                }
              } else {
                needRename = true;
              }
  
              if (needRename) {
                log.info("Attempting rename from [%s] to [%s]", indexZipFilePath, finalIndexZipFilePath);
                return outputFS.rename(indexZipFilePath, finalIndexZipFilePath);
              } else {
                return true;
              }
            },
            FileUtils.IS_EXCEPTION,
            NUM_RETRIES
        );
      }
      catch (Exception e) {
        throw new RuntimeException(e);
      }
    }