[SERVER-36944] applyOps does not permit unknown field names when creating a v:1 index Created: 30/Aug/18 Updated: 29/Oct/23 Resolved: 25/Sep/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance, Replication |
| Affects Version/s: | 3.4.14, 3.6.7, 4.0.2 |
| Fix Version/s: | 3.4.18, 3.6.9, 4.0.3, 4.1.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Benety Goh |
| 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.0, v3.6, v3.4
|
||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||||
| Sprint: | Storage NYC 2018-09-24, Storage NYC 2018-10-08 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Description |
|
MongoDB 3.4 introduced validation of index options ( Therefore, the applyOps command should ignore any unknown options when creating a v:1 index. On the other hand, applyOps should error on unknown options for v:2 indexes. This works correctly for op:"c" createIndexes oplog entries:
However, when the oplog entry is an insert into system.indexes, unknown options are rejected regardless of index version:
This is not the expected behavior in the v:1 case. It looks like this is due to applyOps's implementation of insert into system.indexes in terms of the DBDirectClient. Support for anything related to system.indexes was recently removed as part of |
| Comments |
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit bf2cfbd09d6695e2c84b295c3aa539adaf6496a8) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 72ff3cb4ee0082e4310505fb10e32eaa133cb0a6) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit bf2cfbd09d6695e2c84b295c3aa539adaf6496a8) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 72ff3cb4ee0082e4310505fb10e32eaa133cb0a6) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 5e46c5444dd56c4a18755cfc7b71ef3c1b44c421) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit 72ff3cb4ee0082e4310505fb10e32eaa133cb0a6) | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: | |||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 24/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: | |||||||||||||||||||||||||||||||||||||
| Comment by Tess Avitabile (Inactive) [ 04/Sep/18 ] | |||||||||||||||||||||||||||||||||||||
|
Sending to the Storage team, since this issue was introduced by | |||||||||||||||||||||||||||||||||||||
| Comment by David Storch [ 30/Aug/18 ] | |||||||||||||||||||||||||||||||||||||
|
In that case, my guess is that this was introduced by https://github.com/mongodb/mongo/commit/4b2f7438ec3494cdf5f4f996bc1ac955a0698f40 under | |||||||||||||||||||||||||||||||||||||
| Comment by Shane Harvey [ 30/Aug/18 ] | |||||||||||||||||||||||||||||||||||||
|
Looks like the server's validation when inserting into system.indexes became more strict in 3.4.14. Here's 3.4.13:
And 3.4.14:
|