You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MongoDB: the TTL sweep parses the stored number text as an integer, so a TTL value the native ADD pipeline writes as 1700000000.0 never expires #810
On MongoDB, the TTL sweep reads the stored text of the TTL number and parses it as a 64-bit integer. The native ADD pipeline writes the Decimal128 text of its sum, and with a fraction among the operands that text can end in .0. On MongoDB 7, 0.5 + 0.5 is written 1.0. By the same rule, 1699999999.5 + 0.5 is written 1700000000.0. GetItem returns 1700000000, because reads normalize a number, but the sweep cannot parse 1700000000.0 as an integer and skips the item.
Cause
Found by reading the code. The sweep was not run against such an item.
crates/storage-mongodb/src/metadata_engine.rs:520 calls n_str.parse::<i64>() on the stored text for an attribute name without a dot.
metadata_engine.rs:56 converts the stored text to long, with onError: null, for an attribute name that contains a dot.
main writes the same text: its native pipeline takes every number ADD. #803 keeps an ADD with a fraction on the native pipeline within its digit limits.
Fix shape
Parse the normalized text in the sweep (validate_and_normalize_number), and convert to decimal in the dotted-name query. DynamoDB's handling of a TTL value with a fraction was not measured, so the fix should keep today's handling of a value that is not an integer.
Activity