Skip to content

Remove leader election, step 3: remove yielding of leadership; remove sending queries to leader.#11795

Merged
alexey-milovidov merged 2 commits intomasterfrom
remove-leader-election-3
Jun 20, 2020
Merged

Remove leader election, step 3: remove yielding of leadership; remove sending queries to leader.#11795
alexey-milovidov merged 2 commits intomasterfrom
remove-leader-election-3

Conversation

@alexey-milovidov
Copy link
Copy Markdown
Member

@alexey-milovidov alexey-milovidov commented Jun 19, 2020

Changelog category (leave one):

  • Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Remove leader election, step 3: remove yielding of leadership; remove sending queries to leader.

Remove leader election:
step 1: update and check version of "log" node #11637
step 2: allow multiple leaders #11639
step 3: remove yielding of leadership; remove sending queries to leader. #11795

@blinkov blinkov added the pr-improvement Pull request with some product improvements label Jun 19, 2020
@alexey-milovidov
Copy link
Copy Markdown
Member Author

ClickHouse build check — 20/21 builds are OK

An error in infamous "Sandbox" infrastructure.

@alexey-milovidov alexey-milovidov merged commit d341e34 into master Jun 20, 2020
@alexey-milovidov alexey-milovidov deleted the remove-leader-election-3 branch June 20, 2020 05:24
@genzgd
Copy link
Copy Markdown
Contributor

genzgd commented Jul 6, 2020

How does this affect zookeeper usage and performance? Currently we have ClickHouse in multiple datacenters, but we use the replicated_can_become_leader to ensure all leaders are in the same datacenter as the "voting" zookeeper cluster. Before we did that we saw issues with too many active merges. Is the replicated_can_become_leader setting deprecated? Will this affect merge operations positively or negatively in our configuration?

@genzgd
Copy link
Copy Markdown
Contributor

genzgd commented Jul 6, 2020

Also, do we have to upgrade all replicas to 20.5 at the same time?

@alexey-milovidov
Copy link
Copy Markdown
Member Author

Is the replicated_can_become_leader setting deprecated?

The setting remains and has the same effect.
We allow multiple leaders but you can disable leadership for specific replicas with replicated_can_become_leader.

Also, do we have to upgrade all replicas to 20.5 at the same time?

No, it's 100% compatible. New versions can become leader if there is no old leader.

How does this affect zookeeper usage and performance?

The number of request to ZooKeeper may increase but insignificantly in most configurations.
Significant increase of ZooKeeper load may occur if you have very high number of replicas in a single shard.

Will this affect merge operations positively or negatively in our configuration?

Merges should work in the same way.
Also it can eliminate the need of replicated_can_become_leader tuning, but it's Ok to keep it as it was.

@genzgd
Copy link
Copy Markdown
Contributor

genzgd commented Jul 6, 2020

Thanks for the details!

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

Labels

pr-improvement Pull request with some product improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants