aeron-io/aeron · info · ClusterEvent
Truncating Cluster Log - memberId=
Error message
Truncating Cluster Log - memberId=${memberId} state=${state} this.logLeadershipTermId=${logLeadershipTermId} this.leadershipTermId=${leadershipTermId} this.candidateTermId=${candidateTermId} this.commitPosition=${commitPosition} this.logPosition=${logPosition} this.appendPosition=${appendPosition} oldPosition=${oldPosition} newPosition=${newPosition} What it means
ClusterEvent thrown by Election.onTruncateLogEntry after the follower's local log has been truncated back to newPosition via consensusModuleAgent.truncateLogEntry. It is an informational marker recording full election state (memberId, terms, positions) at the moment the log was rolled back, typically when a follower discovers the leader's log diverges from its own. The truncation has already been applied; this exception communicates the state transition.
Solutions
- Inspect the log lines preceding this event to confirm truncation was expected; no action is needed if the cluster recovers and elects normally
- If truncation loops repeatedly, verify all members share the same recording log directory and aeron.cluster.dir configuration
- Check that the recording log (cluster-mark.mark / segment files) was not manually copied or restored from a different cluster
- Upgrade to the latest Aeron patch release; election truncation edge cases have been fixed over time
Defensive patterns
Strategy: try-catch
Try / catch
// Election runs inside the cluster container; catch at service level if embedding
catch (ClusterEvent e) {
// informational: log truncation already applied; monitor and let election continue
LOG.info("Election log truncation event: {}", e.getMessage());
} Prevention
- Never manually copy recording logs between cluster members
- Keep all members on the same Aeron version
- Monitor election events in logs to detect repeated truncation loops
When it happens
Trigger: A follower in an election receives a NEW_LEADERSHIP_TERM event whose logPosition/appendPosition is behind what it has already appended, so onNewLeadershipTerm calls onTruncateLogEntry to roll its local recording log back to the leader's position.
Common situations: Cluster recovery after a leader crash where the previous leader committed entries that the new leader never had; split-brain residue; rejoining a stale member with a longer log than the elected leader.
Understand the failure class
Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.
AI-assisted analysis of aeron-io/aeron@6d60124e15 (2026-09-12).
Data as JSON: /api/errors/4f8724d23a99a8fa.
Report an issue: GitHub.
Appendix: source
Thrown at aeron-cluster/src/main/java/io/aeron/cluster/Election.java:636
final long appendPosition,
final long oldPosition,
final long newPosition)
{
ClusterTracing.traceOnTruncateLogEntry(
memberId,
state,
logLeadershipTermId,
leadershipTermId,
candidateTermId,
commitPosition,
logPosition,
appendPosition,
oldPosition,
newPosition);
consensusModuleAgent.truncateLogEntry(logLeadershipTermId, newPosition);
this.appendPosition = newPosition;
throw new ClusterEvent("Truncating Cluster Log - memberId=" + memberId +
" state=" + state +
" this.logLeadershipTermId=" + logLeadershipTermId +
" this.leadershipTermId=" + leadershipTermId +
" this.candidateTermId=" + candidateTermId +
" this.commitPosition=" + commitPosition +
" this.logPosition=" + logPosition +
" this.appendPosition=" + appendPosition +
" oldPosition=" + oldPosition +
" newPosition=" + newPosition);
}
long notifiedCommitPosition()
{
return notifiedCommitPosition;
}
private int init(final long nowNs)
{View on GitHub (pinned to 6d60124e15)