timescaledb icon indicating copy to clipboard operation
timescaledb copied to clipboard

Backport to 2.14.x: #6773: Improve chunks status modification for consistency

Open timescale-automation opened this issue 11 months ago • 1 comments

This is an automated backport of #6773: Improve chunks status modification for consistency. 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

Improve chunks status modification for consistency

Due to the chunk status being a bitmap, updating any of the flags needs previous locking of the tuple to make sure nobody can update the status from under us and cause lost updates. This change unifies all the places were we change chunk status and makes this more explicit so we don't run into concurrency issues due to updates.

Disable-check: force-changelog-file

timescale-automation avatar Mar 25 '24 08:03 timescale-automation

Codecov Report

Attention: Patch coverage is 74.02597% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 79.74%. Comparing base (39616e8) to head (8430e31). Report is 14 commits behind head on 2.14.x.

Files Patch % Lines
src/chunk.c 74.02% 6 Missing and 14 partials :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##           2.14.x    #6782   +/-   ##
=======================================
  Coverage   79.73%   79.74%           
=======================================
  Files         190      190           
  Lines       37343    37325   -18     
  Branches     9483     9496   +13     
=======================================
- Hits        29777    29763   -14     
+ Misses       3147     3132   -15     
- Partials     4419     4430   +11     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 25 '24 09:03 codecov[bot]

Released with 2.15, closing.

antekresic avatar May 13 '24 08:05 antekresic