Repository navigation
Distributed DDL improvements - #21535
Merged
Merged
Conversation
tavplubix
marked this pull request as ready for review
March 9, 2021 17:54
nikitamikhaylov
approved these changes
Mar 29, 2021
| } | ||
|
|
||
| ClusterPtr new_cluster = getClusterImpl(); | ||
| std::lock_guard lock{mutex}; |
Member
There was a problem hiding this comment.
Maybe move this line above previous? Because many threads will try construct a cluster... And it seems that you can lock mutex only once at the beginning of the method without additional scopes.
| if (hosts.empty()) | ||
| throw Exception(ErrorCodes::LOGICAL_ERROR, "No hosts found"); | ||
| Int32 cver = stat.cversion; | ||
| Int32 cversion = stat.cversion; |
Member
There was a problem hiding this comment.
Is there any useful information inside /replicas node itself (without children)? Maybe better to check version in addition to cversion?
Member
Author
There was a problem hiding this comment.
As for now /replicas node does not store any informatin
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.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
distributed_ddl_entry_format_versionto 2 to enable this.distributed_ddl_output_modesetting. Supported modes:none,throw(default),null_status_on_timeoutandnever_throw.Replicateddatabase engine.Detailed description / Documentation draft:
When
distributed_ddl_output_modeis set tothrowdistributed DDL query returns result set with query execution status for all hosts where query is finished. If query has failed on some hosts, then it will rethrow the first exception. If query is not finished yet on some hosts anddistributed_ddl_task_timeoutexceeded, then it throwsTIMEOUT_EXCEEDEDexception.noneis similar tothrow, but distributed DDL query returns no result set.null_status_on_timeoutmeans returnNULLas execution status in some rows of result set instead of throwingTIMEOUT_EXCEEDEDif query is not finished on the corresponding hosts.never_throwmeans do not throwTIMEOUT_EXCEEDEDand do not rethrow exceptions if query has failed on some hosts.