[SERVER-20439] Use OpTimes as SnapshotNames Created: 16/Sep/15  Updated: 06/Dec/22  Resolved: 26/Feb/18

Status: Closed
Project: Core Server
Component/s: Internal Code, Replication, Storage
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Replication Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-31304 remove SnapshotName class Closed
is related to SERVER-20260 New indexes should bump their Collect... Closed
Assigned Teams:
Replication
Participants:

 Description   

As part of the work on SERVER-19212 we made SnapshotNames be a simple monotonically increasing counter rather than using names derived from OpTimes. This made it possible to establish a happens before/after relationship between snapshots and events that do not change the OpTime, including background index builds on secondaries, and reindex and repair operations. This had the downside of introducing an additional notion of time that had to be tracked to ensure that w:majority could fulfil its full contract.

We now think these operations can simply use an OpTime > now and request the creation of a new OpTime (on an 'n' oplog entry) using a back channel such as heartbeats to handle a steady-state idle system where newer writes are not coming in. This will need to use an OpTime > now both as the last OpTime for the client and as the minimum OpTimes for collections and indexes. This should enable us to undo the change from SERVER-20260 which was a temporary solution to this problem.



 Comments   
Comment by Eric Milkie [ 26/Feb/18 ]

SnapshotName was removed as part of the deployment of timestamps to all operations, so the work this ticket describes is now in effect.

Comment by Githook User [ 17/Sep/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-20260 New indexes should bump their Collection's minimum SnapshotName

This is a temporary solution to ensure that indexes created with w:majority
are guaranteed to be usable to a read using majority readConcern level. These
changes will be made undone once we complete the work of reunifying OpTime and
SnapshotName for SERVER-20439.
Branch: master
https://github.com/mongodb/mongo/commit/480df0c4376f5faa572ba031e53483f071cf1423

Generated at Thu Feb 08 03:54:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.