[SERVER-56676] improve handling of large/NaN values for expireAfterSeconds TTL index option Created: 05/May/21 Updated: 29/Oct/23 Resolved: 07/May/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.0.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Benety Goh | 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.4, v4.2
|
||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2021-05-17 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 115 | ||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
The TTLMonitor is responsible for removing expired documents from a collection with a TTL index. The expireAfterSeconds option is a numerical value that is used to calculate the expiration time for removing documents. Currently, the TTLMonitor ensures that this option is a numerical type but does not check for NaN or values that exceed the range of a long long type. To handle existing TTL indexes that may contain unrepresentable values, we should consider extracting the expireAfterSeconds option using BSON::safeNumberLong() instead. We would still be able to evaluate a reasonable expiration time from the safely converted numerical value. |
| Comments |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: Revert " This reverts commit 8ff8a14216bef7f7d6fd7720a9727886f529e287. |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: Revert " This reverts commit 921c4514352f572bc64b78f068d765206c12e301. |
| Comment by Githook User [ 27/Jul/22 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit daa37e38c73b0eed3ef91d7156e71f7aa6028e42) |
| Comment by Benety Goh [ 27/Jul/22 ] |
|
The 4.4 and 4.2 backports do not use the safeExpirationDate() function added in |
| Comment by Githook User [ 26/Jul/22 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: (cherry picked from commit daa37e38c73b0eed3ef91d7156e71f7aa6028e42) |
| Comment by Githook User [ 06/May/21 ] |
|
Author: {'name': 'Benety Goh', 'email': 'benety@mongodb.com', 'username': 'benety'}Message: |