apache/cassandra · info

Throttling file deletion: waited

Error message

Throttling file deletion: waited {} seconds to delete {}

What it means

When file deletions are rate-limited (RateLimiter), PathUtils.delete acquires a permit before unlinking; if the limiter made the thread wait, it logs a spam-limited warning reporting how many seconds the delete was throttled and which path.

Solutions

  1. Tune cassandra.yaml disk_optimization_strategy / deletion rate-related settings or the RateLimiter rate to match disk capability
  2. Treat as informational unless deletion lag causes disk space pressure
  3. Increase the limit if disk space is filling faster than files are deleted
  4. Schedule heavy cleanup during off-peak hours

Example fix

null
Defensive patterns

Strategy: fallback

Validate before calling

null

Type guard

null

Try / catch

try {
    PathUtils.delete(file, rateLimiter);
} catch (IOException e) { /* deletion failed after throttling; handle */ }
// expect the throttling warn log when waits exceed 0

Prevention

When it happens

Trigger: Deleting files via PathUtils.delete(path, rateLimiter) when the deletion rate exceeds the configured limiter rate, causing blocking waits (typically during large cleanup/compaction bursts).

Common situations: Large compaction or snapshot teardown on slow disks with a low deletion rate limit; GC-unfriendly deletion storms being deliberately throttled.

Related errors


AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10). Data as JSON: /api/errors/f1a63b2f43ea631e. Report an issue: GitHub.

Appendix: source

Thrown at src/java/org/apache/cassandra/io/util/PathUtils.java:320

        try
        {
            Files.delete(file);
            onDeletion.accept(file);
            return true;
        }
        catch (IOException e)
        {
            return false;
        }
    }

    public static void delete(Path file, @Nullable RateLimiter rateLimiter)
    {
        if (rateLimiter != null)
        {
            double throttled = rateLimiter.acquire();
            if (throttled > 0.0)
                nospam1m.warn("Throttling file deletion: waited {} seconds to delete {}", throttled, file);
        }
        delete(file);
    }

    public static Throwable delete(Path file, Throwable accumulate, @Nullable RateLimiter rateLimiter)
    {
        try
        {
            delete(file, rateLimiter);
        }
        catch (Throwable t)
        {
            accumulate = merge(accumulate, t);
        }
        return accumulate;
    }

    /**

View on GitHub (pinned to 88fd0f6a0e)