# errors.EPOCH_MISMATCH

## NAME

EPOCH_MISMATCH — a node attempted to write to a shard it no longer owns because the cluster epoch advanced.

## SYNOPSIS

HTTP: `409` `Conflict`. Retryable: `yes`.

## DESCRIPTION

Shard ownership is tracked by an epoch counter that increments whenever the cluster re-partitions. A write is rejected with this error when the writing node's cached epoch is stale — another node has since taken ownership of the shard. This prevents split-brain writes.

Retryable. The routing layer re-routes to the current shard owner on retry. Frequent recurrence indicates cluster instability or high re-partitioning frequency.

## SEE ALSO

- errors
- errors.CONFLICT
- errors.TX_CONFLICT
