Repository navigation
Introduce OPTIMIZE DRY RUN query for emulating a merge - #96122
Conversation
|
Workflow [PR], commit [d4bdc6e] Summary: ❌
|
Will merge with writing result part to /detached directory have any use cases? |
Maybe it makes sense to move part to detached in case of failure to allow investigation of data. |
Michicosun
left a comment
There was a problem hiding this comment.
Wdyt not add an additional merge selector that will be populated with merge variants through this type of query? It will allow us to write deterministic tests about MergerMutator.
| /// Delete 'is_deleted' data | ||
| bool cleanup = false; | ||
| /// Dry run mode: execute merge but do not commit the result | ||
| bool dry_run = false; |
There was a problem hiding this comment.
It also makes sense to introduce a regular optimize query with a parts list that will actually commit the merged part. This will allow us to validate merge predicate bugs.
There was a problem hiding this comment.
We decided to implement regular OPTIMIZE with a parts list that triggers a special manual merge selector in a future PR. The feature will be guarded by a setting and intended primarily for testing, since manual merges that commit the result part are unsafe for production use.
1818bc6
|
Could you please also add docs to https://clickhouse.com/docs/sql-reference/statements/optimize? |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Added
OPTIMIZE <table> DRY RUN PARTS <part names>query to simulate merges without committing the result part. It may be useful for testing purposes: verifying merge correctness in the new version, deterministically reproducing merge-related bugs, and reliably benchmarking merge performance.Documentation entry for user-facing changes
Version info
26.2.1.952