[SERVER-33991] Pass txnNumber all the getMore command on mongos Created: 19/Mar/18 Updated: 29/Oct/23 Resolved: 23/Apr/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 3.7.6 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Misha Tyulenev | Assignee: | Jack Mulrow |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Sharding 2018-04-23, Sharding 2018-05-07 | ||||||||
| Participants: | |||||||||
| Description |
|
Old Description: txnNumber must be passed through getMore command to implement global snapshot reads. Proposed approach: 1. Add boost::optional private field _txnNumber to:
2. In the ClusterClientCursorImpl constructors
3. In AsyncResultsMerger constructor
Note: I need to store it in two places because the ARM needs the txnNumber to attach it to getMore requests and the ClusterClientCursor needs it to surface it to the PinnedCursor checked out in ClusterFind::runGetMore so we can validate the txnNumber sent by the user in subsequent getMores 4. In AsyncResultsMerger::_askForNextBatch
5. In ClusterFind::runGetMore
6. Delete getMore txnNumber check in ShardingTaskExecutor here Here's a POC I made that passes the existing global snapshot reads tests we have, if this approach is approved, I'll add more testing, esp. unit tests: https://mongodbcr.appspot.com/201070002 |
| Comments |
| Comment by Githook User [ 23/Apr/18 ] |
|
Author: {'email': 'jack.mulrow@mongodb.com', 'username': 'jsmulrow', 'name': 'Jack Mulrow'}Message: |
| Comment by Charlie Swanson [ 12/Apr/18 ] |
|
jack.mulrow this plan sounds reasonable to me. We will likely have to do the same thing in the ARM for the lsid for |
| Comment by Jack Mulrow [ 11/Apr/18 ] |
|
misha.tyulenev and charlie.swanson, can you guys review the approach / POC above? Thanks! |