Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor job error handling #7291

Merged

Conversation

fabriziomello
Copy link
Contributor

@fabriziomello fabriziomello commented Sep 23, 2024

Reorganized a bit the code to also record more failures in bgw_job_stat_history table.

Also improved a bit the code coverage and added regression tests for failed do start job case.

Disable-check: force-changelog-file

@fabriziomello fabriziomello self-assigned this Sep 23, 2024
Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 90.27778% with 7 lines in your changes missing coverage. Please review.

Project coverage is 82.14%. Comparing base (59f50f2) to head (e0310f7).
Report is 372 commits behind head on main.

Files with missing lines Patch % Lines
src/utils.c 90.69% 0 Missing and 4 partials ⚠️
src/bgw/scheduler.c 88.46% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7291      +/-   ##
==========================================
+ Coverage   80.06%   82.14%   +2.07%     
==========================================
  Files         190      217      +27     
  Lines       37181    38867    +1686     
  Branches     9450    10024     +574     
==========================================
+ Hits        29770    31927    +2157     
+ Misses       2997     2961      -36     
+ Partials     4414     3979     -435     

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

@fabriziomello fabriziomello force-pushed the refactor_job_error_handling branch 4 times, most recently from b90c8d7 to d2b2aac Compare September 24, 2024 13:06
@fabriziomello fabriziomello added bgw The background worker subsystem, including the scheduler tech-debt Needs refactoring and improvement tasks related to the source code and its architecture. labels Sep 24, 2024
@fabriziomello fabriziomello marked this pull request as ready for review September 24, 2024 13:06
src/bgw/job.h Outdated Show resolved Hide resolved
Copy link
Contributor

@mkindahl mkindahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

test/src/test_utils.c Outdated Show resolved Hide resolved
Reorganized a bit the code to also record more failures in
`bgw_job_stat_history` table.

Also improved a bit the code coverage and added regression tests for
`failed do start job` case.
@fabriziomello fabriziomello merged commit 58c454f into timescale:main Sep 30, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bgw The background worker subsystem, including the scheduler tech-debt Needs refactoring and improvement tasks related to the source code and its architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants