apache/cassandra · warning · RepairException
(dynamic, caller-supplied message) RepairException.warn…
Error message
(dynamic, caller-supplied message) RepairException.warn factory
What it means
RepairException.warn(desc, previewKind, message) is a factory creating a RepairException marked as a 'warn' severity increment repair failure. The message is fully caller-supplied; typical contents include repair session failures, unrepaired-range mismatches, timeouts during validation/sync stages. It is usually surfaced to `nodetool repair` clients or logged by the repair coordinator.
Solutions
- Read the caller-supplied message: it names the repair job desc and the specific stage that failed.
- Re-run `nodetool repair` on the affected keyspace/ranges once all replica nodes are up and not overloaded.
- Check the logs of every replica in the repaired range for the underlying cause (GC pauses, dropped messages, timeouts).
- If preview reported inconsistencies, run a full (non-preview) repair to reconcile the replicas.
Defensive patterns
Strategy: try-catch
Validate before calling
// ensure all replicas are UP before repairing
Set<InetAddressAndPort> down = endpoints.stream().filter(ep -> !Gossiper.instance.isAlive(ep)).collect(Collectors.toSet());
if (!down.isEmpty()) throw new IllegalArgumentException("Refusing repair, nodes down: " + down); Try / catch
try { repairService.repair(ks, tables, options); } catch (RepairException e) { if (RepairException.shouldWarn(e)) logger.warn("Repair warning: {}", e.getMessage()); else throw e; } Prevention
- Repair only when all replicas are up and not overloaded.
- Avoid running concurrent repairs on overlapping ranges.
- Watch preview output and reconcile with a full repair when mismatches appear.
- Check replica logs for GC/dropped-message causes after a warn-level failure.
When it happens
Trigger: Any repair job stage (ValidationTask, SyncTask, RepairSession) that calls RepairException.warn with a session-specific message when a repair step fails in a way deemed non-fatal/warning-worthy, e.g. a node stopped responding during validation or preview mismatch found during `nodetool repair --preview`.
Common situations: Preview repair (`nodetool repair --preview`) detecting inconsistencies between replicas; incremental repair sessions hitting timeouts; anti-compaction or sync failures while a node is overloaded or down.
Related errors
- A repair_session_space of
- A repair_session_space of
- An incremental repair with session id
- Attempting to load denylist and not enough nodes are…
- Auto-repair scheduler is disabled.
AI-assisted analysis of apache/cassandra@88fd0f6a0e (2026-09-10).
Data as JSON: /api/errors/58f0adc8573c9d98.
Report an issue: GitHub.
Appendix: source
Thrown at src/java/org/apache/cassandra/exceptions/RepairException.java:48
private final boolean shouldLogWarn;
private RepairException(@Nullable RepairJobDesc desc, PreviewKind previewKind, String message, boolean shouldLogWarn)
{
this((desc == null ? "" : desc.toString(previewKind != null ? previewKind : PreviewKind.NONE)) + ' ' + message, shouldLogWarn);
}
private RepairException(String msg, boolean shouldLogWarn)
{
super(msg);
this.shouldLogWarn = shouldLogWarn;
}
public static RepairException error(@Nullable RepairJobDesc desc, PreviewKind previewKind, String message)
{
return new RepairException(desc, previewKind, message, false);
}
public static RepairException warn(@Nullable RepairJobDesc desc, PreviewKind previewKind, String message)
{
return new RepairException(desc, previewKind, message, true);
}
public static RepairException warn(String message)
{
return new RepairException(message, true);
}
public static boolean shouldWarn(Throwable throwable)
{
return throwable instanceof RepairException && ((RepairException)throwable).shouldLogWarn;
}
}
View on GitHub (pinned to 88fd0f6a0e)