DRIVERS-3274 Send afterClusterTime on writes in causally-consistent sessions.#1930
DRIVERS-3274 Send afterClusterTime on writes in causally-consistent sessions.#1930matthewdale wants to merge 12 commits into
Conversation
| `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`) |
There was a problem hiding this comment.
Should we specify list of commands here to avoid any confusion?
There was a problem hiding this comment.
Yes, I'll update the list in "Read Write Concern", which "Causal Consistency" links to.
…kWrite to the description of write commands.
|
@sanych-sun Could you link the C# implementation draft / CI for tests? |
|
Assigned |
…ns test assertions.
|
Here's the Go Driver proof-of-concept implementation: mongodb/mongo-go-driver#2380 |
rozza
left a comment
There was a problem hiding this comment.
Looking good - just a couple of questions.
Also should there be a dropDatabase test in causal-consistency-write-commands.yml?
| ``` | ||
|
|
||
| The read concern option is available for the following operations: | ||
| The read concern option is available for most operations, including the following: |
There was a problem hiding this comment.
This comment seems a little loose and confusing. Is there a definitive list and for operations? Can we clarify the scenario where insert will have a ReadConcern? Eg:
- `insert` command via causally-consistent sessions
| - `createIndexes` command | ||
| - `drop` command | ||
| - `dropDatabase` command | ||
| - `dropIndexes` command |
There was a problem hiding this comment.
Does this change warrant the Changelog being updated?
sanych-sun
left a comment
There was a problem hiding this comment.
LGTM + CSharp PR + custom patch with all variants.
DRIVERS-3274
Update the Causal Consistency spec to require that
afterClusterTimeis sent on write commands in causally-consistent sessions. Write commands that should sendafterClusterTimeare:insertupdatefindAndModifydeletebulkWritecreatecreateIndexesdropdropDatabasedropIndexesPreviously,
afterClusterTimewas only sent on read commands and the first command in a transaction.Changes:
readConcernreadConcern.Please complete the following before merging:
clusters).