private Set<SimpleMeta> deleteCurrentBatch(final TaskContext taskContext,
                                               final List<SimpleMeta> simpleMetas,
                                               final Instant deleteThresholdEpoch,
                                               final WorkQueue workQueue,
                                               final Progress progress) {
        Objects.requireNonNull(simpleMetas);
        Objects.requireNonNull(deleteThresholdEpoch);
        Objects.requireNonNull(workQueue);

        Set<SimpleMeta> failedMetasSet = null;
        try {
            final Map<Path, Path> dirToVolPathMap = new ConcurrentHashMap<>(); // dir => volumePath

            // Delete all the files associated with simpleMetas
            final LinkedBlockingQueue<Long> successfulMetaIdDeleteQueue = deleteMetaFiles(
                    taskContext,
                    simpleMetas,
                    workQueue,
                    progress,
                    dirToVolPathMap);

            if (!progress.hasBreachedThreshold()) {
                // Remove any empty directories (including their ancestors, but not the root volumePath)

                deleteEmptyDirs(simpleMetas, deleteThresholdEpoch, progress, dirToVolPathMap);

                if (Thread.interrupted()) {
                    throw new InterruptedException();
                }

                final Set<Long> successfulMetaIdSet = new HashSet<>(successfulMetaIdDeleteQueue.size());
                successfulMetaIdDeleteQueue.drainTo(successfulMetaIdSet);
                final int successCount = successfulMetaIdSet.size();

                failedMetasSet = simpleMetas.stream()
                        .filter(simpleMeta -> !successfulMetaIdSet.contains(simpleMeta.getId()))
                        .collect(Collectors.toSet());

                deleteVolumes(progress, successfulMetaIdSet, successCount);

                deleteMetaRecords(progress, successfulMetaIdSet, successCount);
            } else {
                LOGGER.debug("{} - Aborting as failure threshold breached", TASK_NAME);
            }
        } catch (final InterruptedException e) {
            LOGGER.debug("{} - {}", TASK_NAME, e.getMessage(), e);

            LOGGER.trace(e::getMessage, e);
            // Keep interrupting this thread.
            Thread.currentThread().interrupt();
        }
        return NullSafe.set(failedMetasSet);
    }
Deletes a batch of simpleMetas from the file system and the database.

@param deleteThresholdEpoch The threshold for statusTime, i.e. records <= deleteThresholdEpoch
@param progress             Count of failures that spans multiple batches
@return Those simpleMeta items that could not be deleted for some reason.
stroom-data/stroom-data-store-impl-fs/src/main/java/stroom/data/store/impl/fs/PhysicalDeleteExecutor.java