[SERVER-20191] multi-updates/remove can make successive queries skip shard version checking Created: 28/Aug/15 Updated: 25/Jan/17 Resolved: 10/Sep/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.6.11, 3.0.6, 3.1.7 |
| Fix Version/s: | 2.6.12, 3.0.7, 3.1.8 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Randolph Tan | Assignee: | Randolph Tan |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Backport Completed: | |||||||||
| Sprint: | Sharding 9 (09/18/15) | ||||||||
| Participants: | |||||||||
| Description |
|
Multi-updates are currently unversioned and part of the update execution code path sets the version of the connection to "ignored": This is fine if the connections are used exclusively by write commands as the version information always comes together with the command request and will be reset every time. However, versioned opQuery requests are stateful and rely on the fact that the connection it uses has the shard version information in it. If a connection is initialized with a version and a multi-update/remove gets issued on the same connection afterwards, it will make the connection become "unversioned" for that namespace and succeeding queries using that connection will skip version checking for that namespace until a non-multi write command resets the connection version to something that is not "ignored". The attached test.js demonstrates this behavior. |
| Comments |
| Comment by Githook User [ 10/Sep/15 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: (cherry picked from commit d79fdd83e4eb940d3d98f73f6f492f58c5a8dde5) Conflicts: |
| Comment by Githook User [ 08/Sep/15 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Githook User [ 08/Sep/15 ] |
|
Author: {u'username': u'renctan', u'name': u'Randolph Tan', u'email': u'randolph@10gen.com'}Message: |
| Comment by Andy Schwerin [ 31/Aug/15 ] |
|
renctan, can you please describe how this can happen in the ticket description? |