Class CdcLeadershipSupersededException
Thrown when a CDC checkpoint write is rejected because the writing instance presented a fencing token that has been superseded by a newer leadership tenure — i.e. this instance believes it is the leader but was demoted (a split-brain). The checkpoint's non-decreasing compare-and-swap left the stored LSN unchanged, so no position was regressed or skipped; this exception signals the superseded instance to stop advancing.
public sealed class CdcLeadershipSupersededException : Exception, ISerializable
- Inheritance
-
CdcLeadershipSupersededException
- Implements
- Inherited Members
Remarks
This is a terminal (non-retryable) condition: retrying the write with the same stale token would be rejected identically. The CDC fatal classifier treats it as fatal so the processing pipeline stops rather than spinning, ceding the change feed to the current leader.
This is a benign outcome, not a failure to alarm on: another instance has taken leadership and this instance should simply stand down. A fatal-error handler should distinguish it from a genuine fault — stop this processor quietly rather than crash or page. Re-acquiring leadership and restarting the processor after a subsequent election is the host's concern, not this exception's.
Constructors
CdcLeadershipSupersededException()
Initializes a new instance of the CdcLeadershipSupersededException class.
public CdcLeadershipSupersededException()
CdcLeadershipSupersededException(string)
Initializes a new instance of the CdcLeadershipSupersededException class with a message.
public CdcLeadershipSupersededException(string message)
Parameters
messagestringThe error message.
CdcLeadershipSupersededException(string, Exception)
Initializes a new instance of the CdcLeadershipSupersededException class with a message and inner exception.
public CdcLeadershipSupersededException(string message, Exception innerException)