-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
Fully Compatible
-
v4.9
-
Repl 2021-04-05, Repl 2021-04-19, Repl 2021-05-03
-
151
Tenant migrations were designed to allow donor nodes to serve local and majority reads even after the migration committed, since local and majority reads are allowed to serve stale data.
While this will not cause unexpected behavior for secondary reads, it may be surprising for primary-only reads, since users expect reading and writing to the primary of a single replica set to have read-your-own-writes behavior, unless there is a split brain or failover. This is true even for causal reads, because drivers use implicit sessions by default, and causal consistency in sessions is on by default.
Note that since local and majority reads are untimestamped, the donor primary will have to check if the migration has committed at the time the read starts, rather than comparing the read's timestamp to the blockTimestamp.