[SERVER-31030] Only transfer session related oplog entries that are majority committed during migration Created: 11/Sep/17  Updated: 30/Oct/23  Resolved: 09/Oct/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 3.5.12
Fix Version/s: 3.6.0-rc0

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-73560 disallow invalid term in OpTIme::asQu... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-10-02, Sharding 2017-10-23
Participants:

 Comments   
Comment by Githook User [ 08/Oct/17 ]

Author:

{'email': 'randolph@10gen.com', 'name': 'Randolph Tan', 'username': 'renctan'}

Message: SERVER-31030 Make sure that _getNextSessionMods will only contain oplog entries that are majority committed
Branch: master
https://github.com/mongodb/mongo/commit/155db509a8e376211095cec062f7aa5be1b7707e

Comment by Githook User [ 04/Oct/17 ]

Author:

{'email': 'randolph@10gen.com', 'name': 'Randolph Tan', 'username': 'renctan'}

Message: SERVER-31030 Use full OpTime instead of just Timestamps to refer to oplog entries
Branch: master
https://github.com/mongodb/mongo/commit/0ab7000e04e16813c1e1e3f131f02de102ddffba

Comment by Randolph Tan [ 26/Sep/17 ]

The plan:

1. Change lastWriteTs to lastWriteOpTime
2. Instead of lazily iterating over config.sessions, iterate through the entire table to get all the last write opTime and store them in sorted order.
3. Before iterating over the last write opTime and walk through the prevTs chain, wait for opTime to be replicated to majority.
4. Try to fetch the oplog using the opTime. If the oplog cannot be found, check if it was either rolled back or truncated and fail.

SessionCatalogMigrationSource::notifyNewWriteTS will need to also apply similar changes.

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