<!-- llms-explorer concept facts · https://llms-explorer.com/tree/afterclustertime/ · pack 2026-10-15 · ~1738 tokens -->

# afterClusterTime

> Depth-first rabbithole dossier for afterClusterTime; source-anchored research pack.

Parent: [Causal Consistency](https://llms-explorer.com/tree/causal-consistency/) · 4 facets · 18 facts · page: https://llms-explorer.com/tree/afterclustertime/

## How it works

- [low] The `afterClusterTime` field must be sent when executing causally consistent operations on deployments that support cluster times, but must not be sent on deployments that do not support cluster times. Sources: https://raw.githubusercontent.com/mongodb/specifications/master/source/causal-consistency/causal-consistency.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] The first read in a causally consistent session must not send `afterClusterTime` to the server because the `operationTime` has not yet been determined. Sources: https://raw.githubusercontent.com/mongodb/specifications/master/source/causal-consistency/causal-consistency.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`

## Problems, failure modes and limitations

- [low] You cannot specify `atClusterTime` together with `afterClusterTime`. Sources: https://www.mongodb.com/docs/manual/reference/read-concern.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] An error indicating `afterClusterTime` is greater than `clusterTime` typically signifies the application called `advanceOperationTime()` or used `afterClusterTime` directly without explicitly calling `advanceClusterTime()`. Sources: https://jira.mongodb.org/browse/DRIVERS-2860 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#troubleshooting`
- [low] If a client sends `afterClusterTime` to a new primary that has not advanced its cluster time, it receives an error stating that `readConcern afterClusterTime` must not be greater than the `clusterTime` value. Sources: https://jira.mongodb.org/browse/SERVER-30977 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#troubleshooting`

## Comparisons and alternatives

- [low] Instead of returning an error when `afterClusterTime` exceeds the current cluster time, the new primary should perform a no-op write to advance its cluster time. Sources: https://jira.mongodb.org/browse/SERVER-30977 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`

## Facts and statements

- [low] For read operations in causally consistent sessions, drivers automatically set the `afterClusterTime` read concern option, which is unset for read operations not associated with such sessions. Sources: https://www.mongodb.com/docs/manual/reference/read-concern.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] To satisfy a read request with an `afterClusterTime` value of `T`, a `mongod` must perform the request after its oplog reaches time `T`, waiting to service the request if the oplog has not yet reached that time. Sources: https://www.mongodb.com/docs/manual/reference/read-concern.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] The `afterClusterTime` field can only be set if the read concern level is `majority`, `local`, or `snapshot`. Sources: https://jira.mongodb.org/browse/DRIVERS-2369 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] The `operationTime` must be stored in the `ClientSession` to be passed as the `afterClusterTime` field of the `readConcern` in subsequent causally consistent read and write operations. Sources: https://raw.githubusercontent.com/mongodb/specifications/master/source/causal-consistency/causal-consistency.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] Commands run using `runCommand` must not have an `afterClusterTime` field added to them. Sources: https://raw.githubusercontent.com/mongodb/specifications/master/source/causal-consistency/causal-consistency.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] As of 2026-05-04, `afterClusterTime` is required on all write commands in causally-consistent sessions, not only on read commands. (verified as of 2026-10-15) Sources: https://raw.githubusercontent.com/mongodb/specifications/master/source/causal-consistency/causal-consistency.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] The length of time (in milliseconds) a secondary waits if `afterClusterTime` is greater than the last applied time from the oplog is defined by `waitForSecondaryBeforeNoopWriteMS`. Sources: https://www.mongodb.com/docs/manual/reference/parameters.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] After `waitForSecondaryBeforeNoopWriteMS` passes, if `afterClusterTime` is still greater than the last applied time, the secondary makes a no-op write to advance the last applied time. Sources: https://www.mongodb.com/docs/manual/reference/parameters.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] A retried read sends a read concern document that includes `afterClusterTime`. Sources: https://jira.mongodb.org/browse/DRIVERS-2369 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] If causal consistency is disabled in implicit sessions, retried reads will not send `readConcern.afterClusterTime`. Sources: https://jira.mongodb.org/browse/DRIVERS-2369 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#core`
- [low] Do not manually set `afterClusterTime` for a read operation. Sources: https://www.mongodb.com/docs/manual/reference/read-concern.md — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#antipatterns`
- [low] The `afterClusterTime` value must not be greater than the current `clusterTime`. Sources: https://jira.mongodb.org/browse/DRIVERS-2860 — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/afterclustertime-89fd992ce2/rabbithole-synthesis.md#troubleshooting`
