Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-11245

Docs for SERVER-32517: Parse readConcern snapshot and atClusterTime

      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.

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              6 years, 2 weeks, 5 days ago