void cleanAllTooOldDirtyCommit(FileSystem fs, int previousVersionsMax) throws IOException {
    FileStatus[] files =
          fs.listStatus(metadataRoot(), name -> VERSION_PATTERN.matcher(name.getName()).matches());
    List<Path> dirtyCommits = Lists.newArrayList();
    int currentMaxVersion = findVersionWithOutVersionHint(fs);
    long now = System.currentTimeMillis();
    // We only clean up dirty commits that are some time old. This ensures that other clients can
    // find out as soon as possible if their current commit is dirty.
    long ttl = 3600L * 24 * 1000 * 7;
    for (FileStatus file : files) {
      long modificationTime = file.getModificationTime();
      Path path = file.getPath();
      if (currentMaxVersion - version(path.getName()) > previousVersionsMax &&
            (now - modificationTime) > ttl) {
        dirtyCommits.add(path);
      }
    }
    for (Path dirtyCommit : dirtyCommits) {
      io().deleteFile(dirtyCommit.toString());
    }
  }
TableOperations implementation for file systems.

<p>For normal file-system(support atomic non-overwriting rename). Users can use it directly
without configuring additional lockManager.

<p>For object storage(not support atomic non-overwriting rename), user should choose a suitable
lockManager implementation.

<p>This maintains metadata in a "metadata" folder under the table location.
iceberg/patched-iceberg-core/src/main/java/org/apache/iceberg/hadoop/HadoopTableOperations.java