[SERVER-31290] Race in SessionCatalogMigrationDestination can cause it to miss some ops Created: 27/Sep/17  Updated: 30/Oct/23  Resolved: 29/Sep/17

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

Type: Bug 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:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding 2017-10-02
Participants:
Linked BF Score: 0

 Description   

scenario:

1. Dest shard depleted session oplog buffer from source. Goes to ready to commit state.
2. Dest shard calls _getNextSessionMods.
3. Source shard returns empty result.
4. Source shard receives a new write.
5. Source shard sees that dest shard is ready to commit and enters critical section.
6. Source shard sends commit command to dest shard.
7. Dest shard receives empty result and sees that source shard tells it to commit.
8. Dest shard finishes up, completely missing op for new write at step #4.



 Comments   
Comment by Githook User [ 28/Sep/17 ]

Author:

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

Message: SERVER-30894/SERVER-31290 Implement command for transferring session information during migration

This reverts commit f24fbb0011c6ded9101f08574e7cd07e63690a9b.
This reverts commit d293f6857bcb36b26ca8fa03d90299714fe060de.
Branch: master
https://github.com/mongodb/mongo/commit/f88f6f43b7ae2af0286437da8f00c0079ed99145

Comment by Githook User [ 28/Sep/17 ]

Author:

{'email': 'ian.whalen@gmail.com', 'name': 'Ian Whalen', 'username': 'IanWhalen'}

Message: Revert "SERVER-31290 Race in SessionCatalogMigrationDestination can cause it to miss some oplog"

This reverts commit 9827b045a3fb0ae734b7b689d5d0e13b160986af.
Branch: master
https://github.com/mongodb/mongo/commit/d293f6857bcb36b26ca8fa03d90299714fe060de

Comment by Githook User [ 28/Sep/17 ]

Author:

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

Message: SERVER-31290 Race in SessionCatalogMigrationDestination can cause it to miss some oplog

Make sure to call _getNextSessionMods at least once after transitioning to "committing" state. Also stop sending oplog for new writes that doesn't is not part of any transaction.
Branch: master
https://github.com/mongodb/mongo/commit/9827b045a3fb0ae734b7b689d5d0e13b160986af

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