Skip to content

Use proper ERRCODE #8043

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fabriziomello
Copy link
Member

No description provided.

Copy link

codecov bot commented May 1, 2025

Codecov Report

Attention: Patch coverage is 3.92157% with 49 lines in your changes missing coverage. Please review.

Project coverage is 82.26%. Comparing base (59f50f2) to head (56ac906).
Report is 947 commits behind head on main.

Files with missing lines Patch % Lines
src/process_utility.c 0.00% 10 Missing and 2 partials ⚠️
src/chunk.c 0.00% 6 Missing and 5 partials ⚠️
tsl/src/continuous_aggs/refresh.c 0.00% 6 Missing ⚠️
tsl/src/compression/create.c 0.00% 4 Missing ⚠️
src/telemetry/telemetry.c 0.00% 3 Missing ⚠️
tsl/src/continuous_aggs/insert.c 0.00% 2 Missing and 1 partial ⚠️
src/histogram.c 0.00% 1 Missing and 1 partial ⚠️
src/hypertable.c 0.00% 2 Missing ⚠️
tsl/src/continuous_aggs/options.c 0.00% 0 Missing and 2 partials ⚠️
src/chunk_scan.c 0.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8043      +/-   ##
==========================================
+ Coverage   80.06%   82.26%   +2.20%     
==========================================
  Files         190      253      +63     
  Lines       37181    46898    +9717     
  Branches     9450    11808    +2358     
==========================================
+ Hits        29770    38582    +8812     
- Misses       2997     3645     +648     
- Partials     4414     4671     +257     

☔ 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.

@@ -20,7 +20,7 @@ FUNCTION_NAME2(check_arrow, CTYPE)(ArrowArray *arrow, int error_type, Decompress
if (n != arrow->length)
{
ereport(error_type,
(errcode(ERRCODE_INTERNAL_ERROR),
(errcode(ERRCODE_TS_UNEXPECTED),
Copy link
Member

Choose a reason for hiding this comment

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

This should throw internal error because it's a bug

@@ -1124,7 +1127,7 @@ compression_setting_orderby_get_default(Hypertable *ht, ArrayType *segmentby)
0 /*count*/);
if (res < 0)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
(errcode(ERRCODE_TS_UNEXPECTED),
Copy link
Member

Choose a reason for hiding this comment

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

This looks more of an internal error than user error. What can the user do to avoid/fix this? If nothing, and they are supposed to report this as a bug, it should be an internal error.

@@ -417,7 +418,7 @@ create_compress_chunk(Hypertable *compress_ht, Chunk *src_chunk, Oid table_id)

if (namelen >= NAMEDATALEN)
ereport(ERROR,
(errcode(ERRCODE_INTERNAL_ERROR),
(errcode(ERRCODE_TS_UNEXPECTED),
Copy link
Member

Choose a reason for hiding this comment

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

ERRCODE_INVALID_NAME?

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.

2 participants