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

Fix planner distributed table count #6113

Merged
merged 1 commit into from Sep 26, 2023

Conversation

svenklemm
Copy link
Member

@svenklemm svenklemm commented Sep 25, 2023

The check for a distributed hypertable was done after ht had been changed to the compressed hypertable potentially leading to miscount or even segfault when the cache lookup for the compressed hypertable returned NULL.

Fixes #5966

@github-actions
Copy link

@gayyappan, @konskov: please review this pull request.

Powered by pull-review

The check for a distributed hypertable was done after ht had been
changed to the compressed hypertable potentially leading to miscount
or even segfault when the cache lookup for the compressed hypertable
returned NULL.
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #6113 (c4b30c2) into main (8c41757) will increase coverage by 7.55%.
Report is 13 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #6113      +/-   ##
==========================================
+ Coverage   73.96%   81.51%   +7.55%     
==========================================
  Files         246      246              
  Lines       49862    56730    +6868     
  Branches    12525    12568      +43     
==========================================
+ Hits        36880    46244    +9364     
- Misses       7128     8098     +970     
+ Partials     5854     2388    -3466     
Files Coverage Δ
src/planner/planner.c 90.50% <100.00%> (+7.05%) ⬆️

... and 226 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@konskov
Copy link
Contributor

konskov commented Sep 25, 2023

Would it be possible to add a test for this fix?

@svenklemm svenklemm enabled auto-merge (rebase) September 26, 2023 16:12
@svenklemm
Copy link
Member Author

Would it be possible to add a test for this fix?

Hmm I think a test that actually fails without the patch is probably quite complex to setup. At least I dont know of a quick way.

@svenklemm svenklemm merged commit 727a027 into timescale:main Sep 26, 2023
37 checks passed
@konskov konskov added this to the TimescaleDB 2.12.1 milestone Oct 5, 2023
konskov added a commit to konskov/timescaledb that referenced this pull request Oct 9, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 do not throw an error when deprecation GUC cannot be read
**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
@konskov konskov mentioned this pull request Oct 9, 2023
konskov added a commit to konskov/timescaledb that referenced this pull request Oct 9, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
pallavisontakke pushed a commit to konskov/timescaledb that referenced this pull request Oct 10, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
konskov added a commit to konskov/timescaledb that referenced this pull request Oct 10, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
konskov added a commit that referenced this pull request Oct 10, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* #6113 Fix planner distributed table count
* #6117 Avoid decompressing batches using an empty slot
* #6123 Fix concurrency errors in OSM API
* #6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
konskov added a commit to konskov/timescaledb that referenced this pull request Oct 10, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
konskov added a commit that referenced this pull request Oct 10, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* #6113 Fix planner distributed table count
* #6117 Avoid decompressing batches using an empty slot
* #6123 Fix concurrency errors in OSM API
* #6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
jnidzwetzki pushed a commit to jnidzwetzki/timescaledb that referenced this pull request Nov 9, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
jnidzwetzki pushed a commit to jnidzwetzki/timescaledb that referenced this pull request Nov 19, 2023
This release contains bug fixes since the 2.12.0 release.
We recommend that you upgrade at the next available opportunity.

**Bugfixes**
* timescale#6113 Fix planner distributed table count
* timescale#6117 Avoid decompressing batches using an empty slot
* timescale#6123 Fix concurrency errors in OSM API
* timescale#6142 Do not throw an error when deprecation GUC cannot be read

**Thanks**
* @symbx for reporting a crash when selecting from empty hypertables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Segmentation fault on selecting empty hypertables
5 participants