Skip to content

Fix stale code in Ensure #6997

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

Merged
merged 3 commits into from
Jun 4, 2024
Merged

Fix stale code in Ensure #6997

merged 3 commits into from
Jun 4, 2024

Conversation

akuzm
Copy link
Member

@akuzm akuzm commented Jun 4, 2024

Also make Ensure use all its argument even in debug mode, so that these things are easier to notice.

The problem was introduced by #6838

Disable-check: force-changelog-file

akuzm added 2 commits June 4, 2024 15:36
Also make Ensure use all its argument even in debug mode, so that these
things are easier to notice.
@akuzm akuzm enabled auto-merge (squash) June 4, 2024 13:48
Copy link

codecov bot commented Jun 4, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.76%. Comparing base (59f50f2) to head (2240fce).
Report is 196 commits behind head on main.

Files Patch % Lines
src/dimension_slice.c 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6997      +/-   ##
==========================================
+ Coverage   80.06%   81.76%   +1.69%     
==========================================
  Files         190      199       +9     
  Lines       37181    37013     -168     
  Branches     9450     9671     +221     
==========================================
+ Hits        29770    30262     +492     
+ Misses       2997     2864     -133     
+ Partials     4414     3887     -527     

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

#define Ensure(COND, FMT, ...) \
do \
{ \
if (unlikely(!(COND))) \
{ \
Assert(false); \
Copy link
Member

Choose a reason for hiding this comment

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

Is this correct? I mean if the condition is false it is intended to ereport on release builds. Or am I missing something?

Copy link
Member

@svenklemm svenklemm Jun 4, 2024

Choose a reason for hiding this comment

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

Assert(false) will only be active in debug builds and trigger coredump, on prod builds you will get the error

@akuzm akuzm merged commit 8880139 into timescale:main Jun 4, 2024
37 of 39 checks passed
@akuzm akuzm deleted the ensure-typo branch June 4, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants