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

Fix active replicas count in quorum inserts #32157

Merged
merged 2 commits into from
Dec 3, 2021

Conversation

tavplubix
Copy link
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehaviour in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Number of active replicas might be determined incorrectly when inserting with quorum if setting replicated_can_become_leader is disabled on some replicas. It's fixed.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Dec 2, 2021
@tavplubix tavplubix added the pr-must-backport Pull request should be backported intentionally. Use this label with great care! label Dec 2, 2021
@tavplubix tavplubix mentioned this pull request Dec 2, 2021
@tavplubix tavplubix force-pushed the fix_active_replicas_count_quorum branch from 14757c2 to 252192b Compare December 2, 2021 18:02
replicas_status_futures.reserve(replicas.size());
for (const auto & replica : replicas)
if (replica != storage.replica_name)
replicas_status_futures.emplace_back(zookeeper->asyncExists(fs::path(storage.zookeeper_path) / "replicas" / replica));
Copy link
Member

Choose a reason for hiding this comment

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

Looks like it's just about existing replicas, not necessary active.

@alexey-milovidov alexey-milovidov self-assigned this Dec 2, 2021
@tavplubix tavplubix merged commit 17f8193 into master Dec 3, 2021
@tavplubix tavplubix deleted the fix_active_replicas_count_quorum branch December 3, 2021 09:39
tavplubix added a commit that referenced this pull request Dec 5, 2021
Backport #32157 to 21.11: Fix active replicas count in quorum inserts
tavplubix added a commit that referenced this pull request Dec 5, 2021
Backport #32157 to 21.10: Fix active replicas count in quorum inserts
tavplubix added a commit that referenced this pull request Dec 5, 2021
Backport #32157 to 21.9: Fix active replicas count in quorum inserts
tavplubix added a commit that referenced this pull request Dec 5, 2021
Backport #32157 to 21.8: Fix active replicas count in quorum inserts
tavplubix added a commit that referenced this pull request Dec 5, 2021
Backport #32157 to 21.3: Fix active replicas count in quorum inserts
@Felixoid Felixoid added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport Pull request should be backported intentionally. Use this label with great care!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants