[DOCS-11245] Docs for SERVER-32517: Parse readConcern snapshot and atClusterTime Created: 24/Jan/18  Updated: 29/Oct/23  Resolved: 16/Apr/18

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 3.7.2

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: readconcern, snapshot
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

https://docs.mongodb.com/manual/reference/read-concern/


Issue Links:
Documented
documents SERVER-32517 Parse readConcern snapshot and atClus... Closed
documents SERVER-33354 Add snapshot read support for additio... Closed
documents SERVER-33541 Add snapshot read support for aggrega... Closed
documents SERVER-34095 Restrict snapshot reads to multi-stat... Closed
Duplicate
duplicates DOCS-11470 Docs for SERVER-33354: Add snapshot r... Closed
duplicates DOCS-11523 Docs for SERVER-34095: Restrict snaps... Closed
Related
related to DOCS-11605 Docs for SERVER-34073: Allow creating... Closed
is related to DOCS-11439 Docs for SERVER-33541: Add snapshot r... Closed
is related to DOCS-11505 Document Transactions Closed
is related to DOCS-11523 Docs for SERVER-34095: Restrict snaps... Closed
Participants:
Days since reply: 5 years, 43 weeks, 5 days ago
Epic Link: DOCS: 4.0 Server

 Description   

Documentation Request Summary:

The readConcern level snapshot should be documented, but atClusterTime should not be documented, since it is only intended for use by mongos. Note that while readConcern level snapshot is not allowed on mongos in the Local Snapshot Reads project (PM-848), it will be allowed for the Global point-in-time reads project (PM-675).

Scope:

  • This ticket will be used just for the readConcern pages and a table of supported operations.
  • Will use shell helpers ticket for the helpers (DOCS-11540) + add examples in the supported operations page (DOCS-11637)
  • Will use transaction ticket for transactions (DPCS-11505) and:
    • need to update for txn that out is not allowed
    • /core/write-operations-atomicity
    • /tutorial/model-data-for-atomic-operations
    • /core/data-modeling-introduction/
    • core/read-isolation-consistency-recency/
    • /core/data-model-operations
    • /tutorial/update-documents
    • /tutorial/insert-documents/
    • /tutorial/remove-documents/
    • /tutorial/perform-findAndModify-linearizable-reads
    • /tutorial/perform-two-phase-commits
    • write-concern
    • readpref
    • linearizable reads
    • cursor.readConcern
    • etc. Will continue scoping when doing txn ticket.

snapshot – only for multi-statement transactions.

Documentation Request Summary (FROM DOCS-11439)

This should probably be handled as part of documenting the local snapshot reads project in general. However, the docs need to somehow indicate that aggregate can be issued with readConcern level "snapshot" (and that aggregate commands can participate in a mutli-document transaction).

Commands that can be run under readConcern level snapshot

  • find
  • getMore
    Note that it will not actually be possible to specify the readConcern level "snapshot" for getMore. Instead, it will inherit its readConcern from the originating command, as it does today.
  • parallelCollectionScan
  • aggregate (including $lookup)
    • The $out stage will be prohibited for use within pipelines executed with readConcern level snapshot due to use of metadata operations.
  • count
  • distinct
  • group
  • geoNear (deprecated)
  • geoSearch
  • insert
  • update (single & multi)
  • delete (single & multi)
  • findAndModify

Engineering Ticket Description:

Parse the following new syntax for readConcern:

{readConcern: {level: "snapshot"}}
{readConcern: {atClusterTime: <timestamp>}}

Parsing for snapshot:

  • Add level "snapshot" to the readConcern interface.
    • Add "snapshot" level definition to the ReadConcernArgs class.
    • Parse in ReadConcernArgs::initialize().
  • Update ReplicationCoordinatorImpl::_validateReadConcern() to allow the readConcern level snapshot with afterClusterTime.
  • Return an error if the mongod is not a member of a replica set.
  • Support readConcern level snapshot for the commands aggregate, count, distinct, group, geoNear, geoSearch, find, insert, update, delete, findAndModify.
  • Ban on mongos.

Parsing for atClusterTime:

  • Add readConcern parsing / initialization components (ReadConcernArgs::initialize()).
    • Remove the "testMode" check.
    • Error if the level is not snapshot.
    • Error if paired with afterOpTime or afterClusterTime.
  • Update ReplicationCoordinatorImpl::_validateReadConcern() to check that the readConcern level is snapshot if atClusterTime is provided.

Engineering Ticket Description: (DOCS-11439)

  1. aggregate
    1. Including support for $lookup
    2. The $out stage will be prohibited for use within pipelines executed with readConcern level snapshot due to use of metadata operations.


 Comments   
Comment by Githook User [ 13/Apr/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-11245, DOCS-11470: read concern snapshot part 1
Branch: master
https://github.com/mongodb/docs/commit/be96cb815f00dea5f29443e767fa3bb57cfded1a

Generated at Thu Feb 08 08:02:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.