Skip to content

DRIVERS-3480 Clarify that the operationTime MUST save rule excludes unacknowledged writes#1938

Open
GromNaN wants to merge 1 commit into
mongodb:masterfrom
GromNaN:fix/causal-consistency-unacknowledged-writes
Open

DRIVERS-3480 Clarify that the operationTime MUST save rule excludes unacknowledged writes#1938
GromNaN wants to merge 1 commit into
mongodb:masterfrom
GromNaN:fix/causal-consistency-unacknowledged-writes

Conversation

@GromNaN
Copy link
Copy Markdown
Member

@GromNaN GromNaN commented May 13, 2026

Jira: https://jira.mongodb.org/browse/DRIVERS-3480

The implementation section stated:

drivers MUST save the operationTime in the ClientSession whether the operation succeeded or not

The "Unacknowledged writes" section then stated:

Since unacknowledged writes don't receive a response from the server (or don't wait for a response) the ClientSession's operationTime is not updated after an unacknowledged write.

These two requirements directly contradict each other: saving operationTime requires a server response, but unacknowledged writes produce none.

The fix adds "acknowledged" to the general rule and adds a cross-reference to the Unacknowledged writes section, making clear the exception applies there.

No behaviour change intended.

The general rule stated drivers "MUST save the operationTime whether the
operation succeeded or not", while the "Unacknowledged writes" section
stated the operationTime is not updated because no response is received.
These appeared contradictory.

Clarify that the MUST applies only to acknowledged operations, and add a
cross-reference to the Unacknowledged writes section explaining why.
@GromNaN GromNaN requested a review from a team as a code owner May 13, 2026 14:08
@GromNaN GromNaN requested review from stIncMale and removed request for a team May 13, 2026 14:08
@GromNaN GromNaN changed the title Clarify that the operationTime MUST save rule excludes unacknowledged writes DRIVERS-3480 Clarify that the operationTime MUST save rule excludes unacknowledged writes May 18, 2026
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.

1 participant