[SERVER-10075] Should forbid illegal form of TTL indexes Created: 01/Jul/13 Updated: 16/Sep/22 Resolved: 16/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.4.4 |
| Fix Version/s: | 4.1.12 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Gregory Wlodarek |
| Resolution: | Done | Votes: | 2 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: |
|
||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Storage NYC 2019-05-20 | ||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||
| Description |
|
I can create a TTL index with multiple fields and it succeeds. It's not until the TTL thread runs that I get an error in the logs: The time to show error (and maybe disallow the index creation?) is when an illegal index is specified. In a related case, user incorrectly specifying expireAfterSeconds as the last field of the index also should get an error rather than the value other than 1 or -1 for field name being accepted. |
| Comments |
| Comment by Githook User [ 16/May/19 ] | |
|
Author: {'email': 'gregory.wlodarek@mongodb.com', 'name': 'Gregory Wlodarek', 'username': 'GWlodarek'}Message: | |
| Comment by Asya Kamsky [ 09/May/19 ] | |
|
Also validate that the number specified isn't too high.
For instance, we probably shouldn't have accepted a number that's big enough to cause this error:
| |
| Comment by Asya Kamsky [ 18/Jul/16 ] | |
|
Same in 3.3.9 - we allow unknown fields as attributes of indexes, and having compound field just causes the same error in the logs every minute. | |
| Comment by Asya Kamsky [ 09/Sep/15 ] | |
|
Still the same behavior in 3.1.6 | |
| Comment by Scott Hernandez (Inactive) [ 15/Oct/13 ] | |
|
Also should validate that the type is a number. |