Skip to content

DOCSP-9967 correct causal consistency scenario 1 text vs image #4076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions source/core/causal-consistency-read-write-concerns.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,13 @@ the following causal consistency guarantees:
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
| 2. Read\ :sub:`1` with read concern :readconcern:`"majority"` to ``S``\ :sub:`2`
| 3. Write\ :sub:`2` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with read concern :readconcern:`"majority"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

.. figure:: /images/causal-rc-majority-wc-majority.svg
Expand Down Expand Up @@ -210,11 +212,13 @@ the following causal consistency guarantees:
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
| 2. Read\ :sub:`1` with read concern :readconcern:`"majority"` to ``S``\ :sub:`1`
| 3. Write\ :sub:`2` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with with read concern :readconcern:`"majority"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

In this sequence, Read\ :sub:`1` cannot return until the
Expand Down Expand Up @@ -292,11 +296,13 @@ provides the following causal consistency guarantees *if causal consistency impl
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`old`
| 2. Read\ :sub:`1` with read concern :readconcern:`"majority"` to ``S``\ :sub:`2`
| 3. Write\ :sub:`2` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with with read concern :readconcern:`"majority"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

.. figure:: /images/causal-rc-majority-wc-1.svg
Expand Down Expand Up @@ -385,14 +391,16 @@ provides the following causal consistency guarantees *if causal consistency impl

- Example

* - | Write\ :sub:`1` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`old`
| Read\ :sub:`1` with read concern :readconcern:`"majority"` to ``S``\ :sub:`1`
| Write\ :sub:`2` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`new`
| Read\ :sub:`2` with with read concern :readconcern:`"majority"` to ``S``\ :sub:`3`
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`old`
| 2. Read\ :sub:`1` with read concern :readconcern:`"majority"` to ``S``\ :sub:`1`
| 3. Write\ :sub:`2` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with with read concern :readconcern:`"majority"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

In this sequence:
Expand Down Expand Up @@ -495,11 +503,13 @@ some situations, but not necessarily in all situations.
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`old`
| 2. Read\ :sub:`1` with read concern :readconcern:`"local"` to ``S``\ :sub:`1`
| 3. Write\ :sub:`2` with write concern :writeconcern:`{ w: 1 } <\<number\>>` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with read concern :readconcern:`"local"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

.. figure:: /images/causal-rc-local-wc-1.svg
Expand Down Expand Up @@ -564,11 +574,13 @@ some situations, but not necessarily in all situations.
* - | 1. Write\ :sub:`1` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
| 2. Read\ :sub:`1` with read concern :readconcern:`"local"` to ``S``\ :sub:`1`
| 3. Write\ :sub:`2` with write concern :writeconcern:`"majority"` to ``P``\ :sub:`new`
|
| 4. Read\ :sub:`2` with read concern :readconcern:`"local"` to ``S``\ :sub:`3`

- | For item ``A``, update ``qty`` to ``50``.
| Read item ``A``.
| For items with ``qty`` less than ``50``, update ``reorder`` to ``true``.
| For items with ``qty`` less than or equal to ``50``,
| update ``restock`` to ``true``.
| Read item ``A``.

.. figure:: /images/causal-rc-local-wc-majority.svg
Expand Down