[SERVER-78369] ignoreUnknownIndexOptions doesn't account for the 'weights' index field Created: 22/Jun/23 Updated: 27/Dec/23 Resolved: 20/Jul/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 6.0.6 |
| Fix Version/s: | 7.1.0-rc0, 7.0.1, 6.0.10, 5.0.21 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Stef Wang | Assignee: | Alberto Massari |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v7.0, v6.0, v5.0
|
||||||||||||||||||||||||
| Steps To Reproduce: | 1. Start a MongoDB 5.0 mongod process
This should result in an error like this:
|
||||||||||||||||||||||||
| Sprint: | QE 2023-07-24 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 162 | ||||||||||||||||||||||||
| Description |
|
Starting in 5.0, the 'weights' field became a reserved field for text indexes. This is an issue for deployments that were upgraded from older versions to 5.0+, because they may still have non-text indexes with this 'weights' field. This causes mongosync processes syncing data from a source cluster with the above to error out because mongosync tries to re-create the same indexes on the destination cluster that's on MongoDB 5.0. mongosync uses the ignoreUnknownIndexOptions when creating indexes, which avoids most instances of invalid index fields but this did not work for the 'weights' field (see reproduction notes below). |
| Comments |
| Comment by Githook User [ 22/Aug/23 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Githook User [ 21/Aug/23 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Githook User [ 09/Aug/23 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Stef Wang [ 08/Aug/23 ] |
|
alberto.massari@mongodb.com Would the server team consider backporting this to 6.0 versions? This is currently affecting customers trying to live migrate to MongoDB Atlas 6.0.8+. |
| Comment by Githook User [ 19/Jul/23 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Githook User [ 18/Jul/23 ] |
|
Author: {'name': 'Gregory Wlodarek', 'email': 'gregory.wlodarek@mongodb.com', 'username': 'GWlodarek'}Message: Revert " This reverts commit fb6c4e3210bfdc387210feff5de738f67fc5da72. |
| Comment by Githook User [ 17/Jul/23 ] |
|
Author: {'name': 'Alberto Massari', 'email': 'alberto.massari@mongodb.com', 'username': 'albymassari'}Message: |
| Comment by Alberto Massari [ 10/Jul/23 ] |
|
The fix that was supposed to ignore bad keywords used in index definition, but it has simply created a list of allowed keywords regardless of the index type. So, "weight" is not removed because it's a valid keyword for FTS indexes, even if it is used in a plain index |