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

Add function to drop the osm chunk #6801

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

konskov
Copy link
Contributor

@konskov konskov commented Apr 3, 2024

requires PR 6815

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

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

Project coverage is 80.73%. Comparing base (59f50f2) to head (8422f2a).
Report is 94 commits behind head on main.

Files Patch % Lines
src/chunk.c 70.00% 1 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6801      +/-   ##
==========================================
+ Coverage   80.06%   80.73%   +0.66%     
==========================================
  Files         190      194       +4     
  Lines       37181    36775     -406     
  Branches     9450     9639     +189     
==========================================
- Hits        29770    29691      -79     
- Misses       2997     3174     +177     
+ Partials     4414     3910     -504     

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

@konskov konskov force-pushed the drop_osm_chunk_func branch 2 times, most recently from ff2896d to 233a516 Compare April 4, 2024 18:53
/* do not drop any chunk dependencies */
ts_chunk_drop(ch, DROP_RESTRICT, LOG);
/* reset hypertable OSM status */
ht->fd.status = HYPERTABLE_STATUS_DEFAULT;
Copy link
Contributor

@gayyappan gayyappan Apr 4, 2024

Choose a reason for hiding this comment

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

should this be done via hypertable_update_status_osm call instead of ts_hypertable_update()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, using hypertable_update_status_osm would probably be a better option as it takes the proper locks for updating the timescaledb_catalog.hypertable row

Comment on lines +80 to +83
CREATE OR REPLACE FUNCTION _timescaledb_functions.drop_osm_table_chunk(
hypertable REGCLASS,
chunk REGCLASS)
RETURNS BOOL AS '@MODULE_PATHNAME@', 'ts_chunk_drop_osm_table_chunk' LANGUAGE C VOLATILE;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not pass only the chunk regclass to this API??

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.

None yet

3 participants