presto-raptor-legacy/src/main/java/io/prestosql/plugin/raptor/legacy/metadata/ShardCleaner.java/ShardCleaner/deleteOldShards
class ShardCleaner:    @VisibleForTesting
    void deleteOldShards()
    {
        while (!Thread.currentThread().isInterrupted()) {
            List<UUID> shards = dao.getOldCreatedShardsBatch();
            if (shards.isEmpty()) {
                break;
            }
            dao.insertDeletedShards(shards);
            dao.deleteCreatedShards(shards);
            backupShardsQueued.update(shards.size());
        }
    }