276 — IndexBuildAborted
queryreplication
The change stream resume token is no longer available in the oplog
What is happening?
ChangeStreamHistoryLost is returned when a change stream attempts to resume from a token that references an oplog entry that has already been overwritten. The oplog is a capped collection with limited size; once it wraps around, old entries are lost. If a change stream consumer falls behind or pauses for too long, its resume token becomes invalid.
Common causes
- Change stream consumer was stopped or paused for too long
- Oplog size is too small for the write throughput
- Consumer processing is too slow to keep up with the change rate
- Application restarted with a stale resume token from persistent storage