apache/cassandra · warning
Session failed acquiring sstables: , retrying every ms for…
Error message
Session {} failed acquiring sstables: {}, retrying every {}ms for another {}s What it means
PendingAntiCompaction's background task attempts to acquire sstables for each repair session. When an attempt fails with SSTableAcquisitionException, it logs which session failed, the reason, the retry interval (acquireSleepMillis), and the remaining wait time, then sleeps and retries until the repair deadline expires.
Solutions
- Let compactions finish or stop them temporarily (nodetool stop compaction / disable) during the repair window
- Reduce compaction pressure (compaction_throughput, pending compactions) before running repair
- Increase the repair/anticompaction time budget so retries have room to succeed
- Retry the repair when the node is quieter; check the logged reason for the specific sstables involved
Defensive patterns
Strategy: retry
Validate before calling
// ensure enough time budget for anticompaction retries
if (deadline - System.currentTimeMillis() < minAcquireWindowMs)
throw new IllegalStateException("Insufficient anticompaction time budget"); Try / catch
try { repairFuture.get(); } catch (ExecutionException e) { logger.warn("Acquire retries exhausted: {}", e.getCause()); scheduleRepairRetry(); } Prevention
- Reduce compaction backlog before repairs
- Increase repair/anticompaction budgets on large tables
- Schedule repairs in low-traffic windows
- Read the logged remaining-seconds to size retry expectations
When it happens
Trigger: Repeated inability to mark sstables compacting during repair because compaction or competing repair sessions keep holding them; occurs on each retry iteration until either acquisition succeeds or the anticompaction task's time budget (delay) is exhausted.
Common situations: Long-running compactions overlapping a repair; nodes with many pending compactions; incremental repair on hot tables; repair timeouts ultimately surfacing as repair failures if retries run out.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
Related errors
- Cannot set concurrent_validations greater than…
- Could not reference sstables
- (dynamic) e.getMessage() from SSTableAcquisitionException
- No holder claimed isPendingRepair
- Prepare phase for incremental repair session
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/bff61bab4d9d0ca6.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/db/repair/PendingAntiCompaction.java:243
// try to modify after cancelling running compactions. This will attempt to cancel in flight compactions including the given sstables for
// up to a minute, after which point, null will be returned
long start = currentTimeMillis();
long delay = TimeUnit.SECONDS.toMillis(acquireRetrySeconds);
// Note that it is `predicate` throwing SSTableAcquisitionException if it finds a conflicting sstable
// and we only retry when runWithCompactionsDisabled throws when uses the predicate, not when acquireTuple is.
// This avoids the case when we have an sstable [0, 100] and a user starts a repair on [0, 50] and then [51, 100] before
// anticompaction has finished but not when the second repair is [25, 75] for example - then we will fail it without retry.
do
{
try
{
// Note that anticompactions are not disabled when running this. This is safe since runWithCompactionsDisabled
// is synchronized - acquireTuple and predicate can only be run by a single thread (for the given cfs).
return acquireSSTables();
}
catch (SSTableAcquisitionException e)
{
logger.warn("Session {} failed acquiring sstables: {}, retrying every {}ms for another {}s",
sessionID,
e.getMessage(),
acquireSleepMillis,
TimeUnit.SECONDS.convert(delay + start - currentTimeMillis(), TimeUnit.MILLISECONDS));
Uninterruptibles.sleepUninterruptibly(acquireSleepMillis, TimeUnit.MILLISECONDS);
if (currentTimeMillis() - start > delay)
logger.warn("{} Timed out waiting to acquire sstables", sessionID, e);
}
catch (Throwable t)
{
logger.error("Got exception disabling compactions for session {}", sessionID, t);
throw t;
}
} while (currentTimeMillis() - start < delay);
return null;
}View on GitHub (pinned to 88fd0f6a0e)