timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

[Bug]: Invalidation log lowest_modified_value > greatest_modified_value

Open GeorgeTan615 opened this issue 7 months ago • 1 comments

What type of bug is this?

Data corruption, Incorrect result, Unexpected error

What subsystems and features are affected?

Continuous aggregate

What happened?

Hello TimescaleDB team and community, I'm bumping into a case where somehow a continuous aggregate's invalidation log has an entry where lowest_modified_value > greatest_modified_value.

select * from _timescaledb_catalog.continuous_aggs_materialization_invalidation_log where materialization_id=2092;
 materialization_id | lowest_modified_value | greatest_modified_value
--------------------+-----------------------+-------------------------
               2092 |  -9223372036854775808 |        1528446599999999
               2092 |      1720018800000000 |      170925119999999999
               2092 |    170929439100000000 |     9223372036854775807

lowest_modified_value = 1720018800000000 (microseconds, Wednesday, July 3, 2024 3:00:00 PM) greatest_modified_value = 170925119999999999 (nanoseconds, Monday, June 2, 1975 7:12:00 AM)

We don't tamper/directly modify invalidation log tables either. Any idea what could cause this?

TimescaleDB version affected

2.15.2

PostgreSQL version used

15.7

What operating system did you use?

(Debian 15.7-0+deb12u1) on x86_64-pc-linux-gnu

What installation method did you use?

Docker

What platform did you run on?

Other

Relevant log output and stack trace

No response

How can we reproduce the bug?

Not sure how this can reproduced as we have no idea how this is possible.

GeorgeTan615 avatar Jul 04 '24 03:07 GeorgeTan615