Skip to content

WIP: Respect ttl_only_drop_parts on alter table materialize ttl - #59189

Closed
arthurpassos wants to merge 19 commits into
ClickHouse:masterfrom
arthurpassos:ttl_optimization_drop
Closed

arthurpassos wants to merge 19 commits into
ClickHouse:masterfrom
arthurpassos:ttl_optimization_drop

Conversation

@arthurpassos

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Performance Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Respect ttl_only_drop_parts on alter table materialize ttl. Only read the necessary columns to recompute TTL and drop parts by replacing them with an empty one.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Information about CI checks: https://clickhouse.com/docs/en/development/continuous-integration/

Comment thread src/Storages/MergeTree/MutateTask.cpp Outdated
ctx->new_data_part->remove_tmp_policy = IMergeTreeDataPart::BlobsRemovalPolicyForTemporaryParts::ASK_KEEPER;

task = std::make_unique<MutateSomePartColumnsTask>(ctx);
if (ctx->execute_ttl_type == ExecuteTTLType::RECALCULATE && ctx->data->getSettings()->ttl_only_drop_parts)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fix: materialize_ttl_recalc_only will become recalc and drop

@nickitat nickitat added the can be tested Allows running workflows for external contributors label Jan 29, 2024
@robot-ch-test-poll4 robot-ch-test-poll4 added the pr-performance Pull request with some performance improvements label Jan 29, 2024
@robot-ch-test-poll4

robot-ch-test-poll4 commented Jan 29, 2024 •

Copy link
Copy Markdown
Contributor

This is an automated comment for commit 4c85503 with description of existing statuses. It's updated for the latest CI running

❌ Click here to open a full report in a separate page

Successful checks
Check nameDescriptionStatus
Docs checkBuilds and tests the documentation✅ success
Style checkRuns a set of checks to keep the code style clean. If some of tests failed, see the related log from the report✅ success
Check nameDescriptionStatus
CI runningA meta-check that indicates the running CI. Normally, it's in success or pending state. The failed status indicates some problems with the PR⏳ pending
ClickHouse build checkBuilds ClickHouse in various configurations for use in further steps. You have to fix the builds that fail. Build logs often has enough information to fix the error, but you might have to reproduce the failure locally. The cmake options can be found in the build log, grepping for cmake. Use these options and follow the general build process⏳ pending
Fast testNormally this is the first check that is ran for a PR. It builds ClickHouse and runs most of stateless functional tests, omitting some. If it fails, further checks are not started until it is fixed. Look at the report to see which tests fail, then reproduce the failure locally as described here❌ failure
Mergeable CheckChecks if all other necessary checks are successful❌ failure

@arthurpassos

Copy link
Copy Markdown
Contributor Author

The "magic" of this PR came from restricting the number of columns to be read by relying on materialize_ttl_recalculate_only logic. It turns out that for compact parts the columns are read regardless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors pr-performance Pull request with some performance improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants