[SERVER-31446] _getNextSessionMods can get stuck in a write conflict retry loop Created: 06/Oct/17  Updated: 30/Oct/23  Resolved: 02/Nov/17

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

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-23, Sharding 2017-11-13
Participants:
Linked BF Score: 0

 Description   

1. Shard receives _getNextSessionMods command.
2. Command tries to query oplog and hits a WriteConflictException
3. QueryYield::yieldAllLocks is called, but it returns early because it's using DBDirectClient so it does not throw away the snapshot (Note: First global lock is taken by AutoGetActiveCloner).
4. Query loop retries, but since it never resets the state during yield, it gets a WCE again, so step#2 is repeated.



 Comments   
Comment by Githook User [ 02/Nov/17 ]

Author:

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

Message: SERVER-31446 _getNextSessionMods can get stuck in a write conflict retry loop
Branch: master
https://github.com/mongodb/mongo/commit/cea82bc2f6e30169421b7896d23b951baa3b96ed

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