[SERVER-22795] lastVisibleOpTime for committed snapshot needs to be the actual snapshot used for the query Created: 22/Feb/16  Updated: 22/Feb/16  Resolved: 22/Feb/16

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Eric Milkie
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-22797 Calls to ShardRegistry::reload needs ... Closed
Operating System: ALL
Sprint: Repl 11 (03/11/16)
Participants:

 Description   

One of the $replData metadata items returned from a query is the lastVisibleOpTime. This value is currently populated by the optime associated with whatever the current read committed snapshot is at the moment the read query finishes. This is not necessarily the same as the optime associated with the snapshot used for the query, however, since this value can be updated while the query is running.
We need to record the actual optime used for the first snapshot that the read query uses, for lastVisibleOpTime.
Note that when queries yield, they can switch snapshots. For correctness with sharding config servers, we must record the optime of the first snapshot used for the query.



 Comments   
Comment by Eric Milkie [ 22/Feb/16 ]

Not going to tackle this problem this way; going to synchronize reads from mongos instead.

Generated at Thu Feb 08 04:01:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.