mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-14 17:43:34 +08:00
In ae21ee96 we fixed a race condition when running a query to get the hypertable sizes and one or more chunks was dropped in a concurrent session leading to exception because the chunks does not exist. In fact the table lock introduced is useless because we also added proper joins with Postgres catalog tables to ensure that the relation exists in the database when calculating the sizes. And even worse with this table lock now dropping chunks wait for the functions that calculate the hypertable sizes. Fixed it by removing the useless table lock and also added isolation tests to make sure we'll not end up with race conditions again.