-
Type: Task
-
Resolution: Duplicate
-
Priority: 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.
- duplicates
-
SERVER-30593 Add 'available' as a valid read concern level
- Closed
- is related to
-
SERVER-29344 Inform queries on a secondary node when the range deleter starts cleaning-up ranges on the primary
- Closed