[SERVER-46393] Always check client last operation time when computing operationTime to append to the response Created: 25/Feb/20 Updated: 29/Oct/23 Resolved: 27/Feb/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | None |
| Fix Version/s: | 4.3.4, 4.0.22, 4.2.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cheahuychou Mao | Assignee: | Cheahuychou Mao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.2, v4.0
|
||||||||
| Sprint: | Sharding 2020-03-09 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 5 | ||||||||
| Description |
|
Currently, if a command has an uninitialized startOperationTime (because the client still has uninitialized opTime when the command starts running), computeOperationTime returns the replication coordinator's lastAppliedOpTime as the operationTime to append to the response for the command. This operationTime could sometimes be later than the opTime for the operation performed by the command. To prevent this, this block of code should be removed so that we always check and try to use the client last operation time when possible. |
| Comments |
| Comment by Githook User [ 15/Nov/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}Message: (cherry picked from commit 679d1e1028ddbdd1ac5778f3e0ab0cb3ffd5ee27) |
| Comment by Githook User [ 14/Nov/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}Message: (cherry picked from commit 679d1e1028ddbdd1ac5778f3e0ab0cb3ffd5ee27) |
| Comment by Prashant Mital (Inactive) [ 10/Apr/20 ] |
|
Thanks esha.maharishi! |
| Comment by Esha Maharishi (Inactive) [ 10/Apr/20 ] |
|
Hi prashant.mital, I don't think this ticket is related to the problem you're describing. This ticket is about what value is returned for operationTime, not whether an operationTime field is returned at all. |
| Comment by Githook User [ 27/Feb/20 ] |
|
Author: {'name': 'Cheahuychou Mao', 'username': 'cheahuychou', 'email': 'cheahuychou.mao@mongodb.com'}Message: |