[SERVER-51074] VectorClock is not gossiped correctly on newly started sessions Created: 21/Sep/20 Updated: 29/Oct/23 Resolved: 24/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.7.0 |
| Fix Version/s: | 4.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Tommaso Tocci |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PM-1645-Milestone-3, bkp, sharding-csrs-stepdown-also | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.7
|
||||||||||||||||||||||||||||||||||||
| Sprint: | Sharding 2020-10-05 | ||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 28 | ||||||||||||||||||||||||||||||||||||
| Description |
|
In order to gossip the different components of the vector clock, we attach them to both commands requests and their replies before to send them over the wire. This is done by calling the VectorClock::gossipOut() function. This function inspects the tags of the current session to decide which components of the vector clock will be gossiped. If no session is found the default tags (passed to the function) will be used for this decision. Now the problem is that a session can exists but it can be still in the early kPending state, in such a case it won't have any of the other tags. This case it is not considered by the VectorClock::gossipOut() function. In fact if a session in a pending state is found we always threat the communication as external and the the default tags (passed to the function) will be ignored. This results in the VectorClock components not being gossiped on all the newly started sessions. |
| Comments |
| Comment by Githook User [ 24/Sep/20 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |
| Comment by Tommaso Tocci [ 23/Sep/20 ] |
|
This fix requires the changes of |
| Comment by Tommaso Tocci [ 22/Sep/20 ] |
|
Yes kevin.pulo this was the idea. A pending session needs to be treated as if it was absent. |
| Comment by Kevin Pulo [ 22/Sep/20 ] |
|
So I guess the solution is to treat a session in kPending the same as if it was absent (ie. honour the default tags), right? |
| Comment by Tommaso Tocci [ 21/Sep/20 ] |
|
Due to this bug, since |