[SERVER-47748] The update stage will not treat as "sharded" for the purposes of validatation and immutable fields config.system.sessions Created: 24/Apr/20 Updated: 29/Oct/23 Resolved: 06/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 4.2.6, 4.4.0-rc3 |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Pierlauro Sciarelli |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Sharding 2020-05-18 | ||||||||
| Participants: | |||||||||
| Description |
|
This two flags:
|
| Comments |
| Comment by Githook User [ 06/May/20 ] | ||||||||||||||||||
|
Author: {'name': 'Pierlauro Sciarelli', 'email': 'pierlauro.sciarelli@mongodb.com', 'username': 'pierlauro'}Message: | ||||||||||||||||||
| Comment by Pierlauro Sciarelli [ 30/Apr/20 ] | ||||||||||||||||||
|
Since the _id field is immutable, I am going to opt for the document validation solution. As I should provide the proper jsonSchema to the validator, is there any official reference about it? Or am I supposed to reverse engineer the schema by manually inspecting config.system.sessions documents? | ||||||||||||||||||
| Comment by Kaloian Manassiev [ 30/Apr/20 ] | ||||||||||||||||||
|
Assigning to pierlauro.sciarelli. I think as part of fixing this bug we should also write a test, which modifies the shard key of a document from this collection, but I am not sure if this is possible in general because the shard key is _id and I don't know whether you can modify a document's _id. Give it a try? Alternatively, as part of the test, you can add a document validation schema to the config.system.sessions collection and try to insert something, which violates that schema. Because of this bug, the document with the bad schema should be accepted. You can probably just add it to this test. | ||||||||||||||||||
| Comment by Tommaso Tocci [ 30/Apr/20 ] | ||||||||||||||||||
|
In the probing patch unittests are failing with:
and here you have the backtrace.pretty.txt | ||||||||||||||||||
| Comment by Tommaso Tocci [ 29/Apr/20 ] | ||||||||||||||||||