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 --keep-going option to "partition attach" and "partition detach" commands #78

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

Alex-Burmak
Copy link
Member

@Alex-Burmak Alex-Burmak commented Nov 23, 2023

No description provided.

)
except Exception as e:
if keep_going:
print(repr(e))
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 logging ?

Copy link
Member Author

@Alex-Burmak Alex-Burmak Nov 23, 2023

Choose a reason for hiding this comment

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

To not hide error from a user and output it to stdout.

Here's an example output:

# chadmin partition attach --all -k
ALTER TABLE `db1`.`events` ATTACH PARTITION ID '20230306'

ClickhouseError("Code: 499. DB::Exception: The specified key does not exist.: while reading key: cloud_storage/cluster1001/shard1/r0000000000000000000000000000000000000000000011110011101111111001-file-ojvazctfenasiyjtsvzzsjmmubpdmgft, from bucket: cloud-storage-cluster1001. (S3_ERROR) (version 23.8.6.16 (official build))\n\nQuery: ALTER TABLE `db1`.`events` ATTACH PARTITION ID '20230306'",)

ALTER TABLE `db1`.`events` ATTACH PARTITION ID '20230326'

We can add logging in addition to outputting error to stdout. And error reporting to stdout not as good as it can be. But for now I implemented --keep-going option in consistent way with other commands that support it.

@aalexfvk aalexfvk merged commit d082687 into main Nov 23, 2023
18 checks passed
@aalexfvk aalexfvk deleted the alex-burmak branch November 23, 2023 09:48
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.

2 participants