Skip to content

Conversation

@timescale-automation
Copy link
Member

This is an automated backport of #8607: Fix interrupted CAgg refresh materialization phase.
The original issue is #8591.
This PR will be merged automatically after all the relevant CI checks pass. If this fix should not be backported, or will be backported manually, just close this PR. You can use the backport branch to add your changes, it won't be modified automatically anymore.

For more details, please see the documentation

Original description

Fix interrupted CAgg refresh materialization phase

In #8514 we improved concurrent CAgg refreshes by splitting the second transaction (invalidation processing and data materialization) into two separated transactions. But now when interrupting the third transaction (data materialization) we'll left behind pending materialization ranges in the new metada table continuous_aggs_materialization_ranges.

Fixed it by properly checking the existance of pending materialization ranges and if it exists execute the materialization.

Disable-check: commit-count

Fixes #8591

In #8514 we improved concurrent CAgg refreshes by splitting the second
transaction (invalidation processing and data materialization) into two
separated transactions. But now when interrupting the third transaction
(data materialization) we'll left behind pending materialization ranges
in the new metada table `continuous_aggs_materialization_ranges`.

Fixed it by properly checking the existance of pending materialization
ranges and if it exists execute the materialization.

(cherry picked from commit a0a109d)
@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

❌ Patch coverage is 86.20690% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.46%. Comparing base (df12b28) to head (3c93ae1).
⚠️ Report is 1 commits behind head on 2.22.x.

Files with missing lines Patch % Lines
tsl/src/continuous_aggs/materialize.c 76.47% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           2.22.x    #8614      +/-   ##
==========================================
+ Coverage   82.36%   82.46%   +0.10%     
==========================================
  Files         248      248              
  Lines       47660    47659       -1     
  Branches    12116    12115       -1     
==========================================
+ Hits        39255    39303      +48     
- Misses       3508     3511       +3     
+ Partials     4897     4845      -52     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timescale-automation timescale-automation merged commit 985ec76 into 2.22.x Sep 8, 2025
45 checks passed
@timescale-automation timescale-automation deleted the backport/2.22.x/8607 branch September 8, 2025 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is-auto-backport PR created by backport automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants