Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-28412

Add flag to allow a query to continue running on a secondary after the primary cleans up orphaned documents

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Sprint:
      Sharding 2017-05-29, Sharding 2017-06-19

      Description

      After a shard donates a chunk, its primary allows queries that were running before the migration to complete before deleting the underlying data.

      The primary does this by tracking the cursors that were active before the migration.

      As part of the Safe Secondary Reads project PM-256, the primary will wait for a short buffer period after the active cursors on the primary are exhausted before deleting the underlying data. This is in order to allow active cursors on secondaries to complete before the underlying data is deleted from beneath them.

      To guarantee correctness, the primary will drop an entry in the oplog before deleting the underlying data to signal to secondaries that they should cut off any active queries that have not been exhausted even after the buffer period.

      However, to preserve the behavior of querying secondaries pre-3.6, we will add a flag, most likely to the readConcern, to allow queries on secondaries to continue even if the underlying data gets deleted.

      Drivers may need to do some work to ensure this new readConcern flag is supported.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              backlog-server-sharding Backlog - Sharding Team
              Reporter:
              esha.maharishi Esha Maharishi
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: