Files
scylladb/test
Nadav Har'El f1997be989 alternator: fix TTL expiration scanner's handling of floating point
The expiration-time attribute used by Alternator's TTL feature has a
numeric type, meaning that it may be a floating point number - not just
an integer, and implemented as big_decimal which has a separate integer
mantissa and exponent. Our code which checked expiration incorrectly
looked only at the mantissa - resulting in incorrect handling of
expiration times which have a fractional part - 123.4 was treated as
1234 instead of 123.

This patch fixes the big_decimal handling in the expiration checking,
and also adds to the test test_ttl.py::test_ttl_expiration check also
for non-integer floating point as well as one with an exponent. The
new tests pass on DynamoDB, and failed on Alternator before this patch -
and pass with it.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
2021-11-25 22:01:37 +02:00
..
2021-11-19 22:06:01 -03:00
2021-09-12 11:32:13 +03:00