timescale / promscale_extension

[DEPRECATED] Tables, types and functions supporting Promscale
Other
37 stars 17 forks source link

Fix: Exception when scanning for new rollups & compressing Caggs #565

Closed Harkishen-Singh closed 2 years ago

Harkishen-Singh commented 2 years ago

Description

This PR does 2 things:

  1. Fixes the exception Caggs already exists that was caused when a cagg for one resolution was again created when the scan_for_new_rollups() was re-executed. Added a test under metric_rollups_scan_for_new_rollups to ensure correct behaviour.
  2. execute_caggs_compression_policy() used to panic when looping over already compressed chunk of a Cagg that has some uncompressed chunks that need compression. Added rerunning compression policy to ensure correct behaviour.

Merge requirements

Please take into account the following non-code changes that you may need to make with your PR: