[SERVER-69091] Handle additional out-of-bounds expireAfterSeconds values for TTL indexes Created: 23/Aug/22 Updated: 29/Oct/23 Resolved: 17/Oct/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.2.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dan Larkin-York | Assignee: | Matthew Saltz (Inactive) |
| 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 | ||||||||||||||||
| Sprint: | Execution Team 2022-10-17, Execution Team 2022-10-31 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
We fixed NaN-handling for TTL indexes in |
| Comments |
| Comment by Mukundhan Sampath [ 10/Feb/23 ] | ||||||||
|
Thanks | ||||||||
| Comment by Dan Larkin-York [ 10/Feb/23 ] | ||||||||
|
I filed | ||||||||
| Comment by Mukundhan Sampath [ 10/Feb/23 ] | ||||||||
|
@Dan, please update the official document about the upper limit and add more details in the error info | ||||||||
| Comment by Mukundhan Sampath [ 09/Feb/23 ] | ||||||||
|
Perfect, this helps | ||||||||
| Comment by Dan Larkin-York [ 09/Feb/23 ] | ||||||||
|
Hi, mukundhan.sampath@3tsoftwarelabs.com. Thanks for reaching out. The error message here is a bit confusing, or at least less informative than it potentially could be. There's slightly different handling for the maximum value depending on whether you're using the expireAfterSeconds field for a secondary index or a time series collection. In the case of a secondary index, the allowed range is from 1 to (2^31 - 1) == 2147483647. Time-series collections are a bit more restricted, and allow a value from 1 to "the number of seconds since the Unix epoch", currently approximately 1675960940 as I type this. Please let me know if you have any other questions or concerns about this issue. | ||||||||
| Comment by Mukundhan Sampath [ 09/Feb/23 ] | ||||||||
|
After further analysis, came to know that it should not be greater than the current epoch time for time series collections | ||||||||
| Comment by Mukundhan Sampath [ 09/Feb/23 ] | ||||||||
|
Attaching the stacktrace
``` }} Stacktrace:
| ||||||||
| Comment by Mukundhan Sampath [ 09/Feb/23 ] | ||||||||
|
Hi Mathew, We were using this feature to set ttl - expireAfterSeconds for time series collection ``` "t1", { timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "hours" }, expireAfterSeconds: 2147483648 } ) ``` and we are getting the following error,
``` ``` Could you please provide the upper limit that is configured for the field ?
Have gone through the code, but it still does not help.
Using the latest mongodb version in atlas.
TIA | ||||||||
| Comment by Githook User [ 17/Oct/22 ] | ||||||||
|
Author: {'name': 'Matthew Saltz', 'email': 'matthew.saltz@mongodb.com', 'username': 'saltzm'}Message: | ||||||||
| Comment by Connie Chen [ 30/Aug/22 ] | ||||||||
|
This may need to get backported past 5.0, potentially all the way to 4.2 |