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

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Sharding
    • Sharding 2017-05-29, Sharding 2017-06-19

      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.

            Assignee:
            backlog-server-sharding [DO NOT USE] Backlog - Sharding Team
            Reporter:
            esha.maharishi@mongodb.com Esha Maharishi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: