apache/cassandra · warning
(dynamic) e.getMessage() from SSTableAcquisitionException
Error message
(dynamic) e.getMessage() from SSTableAcquisitionException
What it means
During PendingAntiCompaction's acquireTuple, Cassandra tries to mark candidate sstables compacting for a repair session. If it fails with SSTableAcquisitionException (e.g. sstables already compacting or being acquired elsewhere), the message is logged at WARN while the full stack trace is only at DEBUG, and the acquisition attempt returns null so repair proceeds without those sstables this round.
Source
Thrown at src/java/org/apache/cassandra/db/repair/PendingAntiCompaction.java:210
private AcquireResult acquireTuple()
{
// this method runs with compactions stopped & disabled
try
{
// using predicate might throw if there are conflicting ranges
Set<SSTableReader> sstables = cfs.getLiveSSTables().stream().filter(predicate).collect(Collectors.toSet());
if (sstables.isEmpty())
return new AcquireResult(cfs, null, null);
LifecycleTransaction txn = cfs.getTracker().tryModify(sstables, OperationType.ANTICOMPACTION);
if (txn != null)
return new AcquireResult(cfs, Refs.ref(sstables), txn);
else
logger.error("Could not mark compacting for {} (sstables = {}, compacting = {})", sessionID, sstables, cfs.getTracker().getCompacting());
}
catch (SSTableAcquisitionException e)
{
logger.warn(e.getMessage());
logger.debug("Got exception trying to acquire sstables", e);
}
return null;
}
protected AcquireResult acquireSSTables()
{
return cfs.runWithCompactionsDisabled(this::acquireTuple, predicate, OperationType.ANTICOMPACTION, false, false, false);
}
public AcquireResult call()
{
logger.debug("acquiring sstables for pending anti compaction on session {}", sessionID);
// 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);View on GitHub (pinned to 88fd0f6a0e)
Solutions
- Check debug.log for the full 'Got exception trying to acquire sstables' stack to see which sstables/compactions collided
- Avoid running multiple repairs concurrently; serialize repair sessions
- Throttle compaction (nodetool stop compaction temporarily or compaction_throughput) during repair windows
- Retry the repair after compactions quiesce; the message itself indicates the node handled it gracefully
Defensive patterns
Strategy: retry
Validate before calling
// avoid collisions: check compacting set before repair
Set<SSTableReader> compacting = cfs.getTracker().getCompacting();
if (compacting.containsAll(candidates)) logger.warn("Candidates busy; defer repair"); Try / catch
// caller pattern around PendingAntiCompaction
try { result = antiCompactionTask.get(); } catch (SSTableAcquisitionException e) { logger.info("Retry later: {}", e.getMessage()); } Prevention
- Serialize repair sessions; avoid overlapping repairs
- Quiesce compaction during repair windows
- Track pending compactions before scheduling repairs
- Check debug.log for which sstables collided
When it happens
Trigger: Running incremental repair (nodetool repair) while concurrent compactions or another repair session already holds the required sstables via the CompactionStrategyManager lifecycle transaction.
Common situations: Overlapping repairs on the same table; aggressive concurrent compaction throughput; anticompaction racing with foreground compaction on busy nodes.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- {} Timed out waiting to acquire sstables
- Prepare phase for incremental repair session %s was unable t
- No holder claimed isPendingRepair: %s, isPendingRepair %s
- You can't mix repaired and unrepaired data in a compaction
- You can't compact sstables from different pending repair ses
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/3f1d4bacdfef00c1.
Report an issue: GitHub.