Skip to content

DRIVERS-3274 Send afterClusterTime on writes in causally-consistent sessions.#1930

Open
matthewdale wants to merge 4 commits intomongodb:masterfrom
matthewdale:drivers3274-after-cluster-time
Open

DRIVERS-3274 Send afterClusterTime on writes in causally-consistent sessions.#1930
matthewdale wants to merge 4 commits intomongodb:masterfrom
matthewdale:drivers3274-after-cluster-time

Conversation

@matthewdale
Copy link
Copy Markdown
Contributor

@matthewdale matthewdale commented Apr 29, 2026

DRIVERS-3274

Updates the Causal Consistency spec to require that afterClusterTime is sent on write commands (insert, update, delete, findAndModify, bulkWrite) in causally-consistent sessions. Previously, afterClusterTime was only sent on read commands. It updates the spec prose, adds two new unified test files, and updates the Read Write Concern spec to list write commands that accept readConcern.


Please complete the following before merging:

  • Is the relevant DRIVERS ticket in the PR title?
  • Update changelog.
  • Test changes in at least one language driver.
  • Test these changes against all server versions and topologies (including standalone, replica set, and sharded
    clusters).

Comment thread source/causal-consistency/tests/causal-consistency-write-commands.yml Outdated
`operationTime` in the `ClientSession` whether the operation succeeded or not.
2. Passing that `operationTime` in the `afterClusterTime` field of the `readConcern` field for subsequent causally
consistent read operations (for all commands that support a `readConcern`)
consistent read and write operations (for all commands that support a `readConcern`)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we specify list of commands here to avoid any confusion?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll update the list in "Read Write Concern", which "Causal Consistency" links to.

@matthewdale matthewdale marked this pull request as ready for review May 5, 2026 15:32
@matthewdale matthewdale requested review from a team as code owners May 5, 2026 15:32
@matthewdale matthewdale requested review from alcaeus and sanych-sun and removed request for a team May 5, 2026 15:32
Copy link
Copy Markdown
Member

@sanych-sun sanych-sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dariakp
Copy link
Copy Markdown
Contributor

dariakp commented May 6, 2026

@sanych-sun Could you link the C# implementation draft / CI for tests?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants