private Optional<SnapshotFile> oldestSnapshotFile() {
        return Optional.ofNullable(snapshots.firstEntry()).map(x -> x.getValue());
    }
Deletes the producer snapshot files until the given offset (exclusive) in a thread safe manner.

@param offset offset number
@throws IOException if any IOException occurs while deleting the files.
storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java