--partitions wrong try to apply for skiped tables like system.*, and more infromative error message when table have incompatible PARTITION BY expression - #1548
Merged
Conversation
ConvertPartitionsToIdsMapAndNamesList applied tuple --partitions values to every table returned by GetTables, including tables with Skip=true (skip_tables, e.g. system.*). For system.metric_log this ended in getPartitionIdWithTempTable and log.Fatal(), killing the API server. Skipped tables are never backed up, so resolving partition_id for them is pointless. Skip them before calling GetPartitionIdAndName. Fixes part of #1547 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Replace log.Fatal() in ConvertPartitionsToIdsMapAndNamesList with a log.Error() that names the table, its PARTITION BY expression and the --partitions value, and explains that the table is backed up without a partition filter. A single unresolvable value (e.g. tuple with two values against a PARTITION BY with one component) killed the whole API server. Fixes #1547 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…resolved ConvertPartitionsToIdsMapAndNamesList now returns an error naming the table, its PARTITION BY expression and the offending --partitions value, and every caller (create, download, dry-run, local table list, restore_cloud) propagates it, so the operation fails with a clear message instead of killing the API server or silently backing up the table without filter. Fixes #1547 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Coverage Report for CI Build 34492104618Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage decreased (-0.09%) to 66.996%Details
Uncovered Changes
Coverage Regressions33 previously-covered lines in 9 files lost coverage.
Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix https://github.com/Altinity/clickhouse-backup/1547