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

ZOOKEEPER-4886: Fix observer with small myid can't join SASL quorum #2211

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

zichen-gan
Copy link

ZK BUG Like QuorumAuthObserverTest#testSmallObserverJoinSASLQuorum
When SASL Quorum like:
server.11=localhost:11223:11224:participant
server.21=localhost:11226:11227:participant
server.1=localhost:11229:11230:observer

The server.1 can't join quorum.

@anmolnar
Copy link
Contributor

anmolnar commented Nov 5, 2024

Thanks @zichen-gan for taking care of this. Could you please create a jira ticket first?

Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

The fix patch makes sense to me at first glance, but what does 'small' mean in this context? One with smaller identifier?

@zichen-gan
Copy link
Author

zichen-gan commented Nov 6, 2024

sure, I create a jira ticket: https://issues.apache.org/jira/browse/ZOOKEEPER-4886

@anmolnar yes, small myid observer can't join sasl quorum.

@zichen-gan
Copy link
Author

Because zk always takes the initiative to connect myid with a larger myid.And startConnection() only authenticate when peer is voting, so observer can't join quorum.

@zichen-gan zichen-gan changed the title fix: small observer can't join quorum, so need use getView() ZOOKEEPER-4886: small observer can't join quorum, so need use getView() Nov 14, 2024
@zichen-gan zichen-gan force-pushed the SASLSmallObserverCanotJion branch from 0e68d1c to dc9fe0f Compare November 19, 2024 07:49
@zichen-gan zichen-gan requested a review from anmolnar November 29, 2024 07:35
Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

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

LGTM with some minor changes to comments

@kezhuw kezhuw changed the title ZOOKEEPER-4886: small observer can't join quorum, so need use getView() ZOOKEEPER-4886: Fix observer with small myid can't join SASL quorum Dec 21, 2024
@kezhuw kezhuw closed this Dec 21, 2024
@kezhuw kezhuw reopened this Dec 21, 2024
Copy link
Contributor

@anmolnar anmolnar left a comment

Choose a reason for hiding this comment

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

lgtm. Please address @kezhuw 's comments.

@zichen-gan zichen-gan force-pushed the SASLSmallObserverCanotJion branch from dc9fe0f to 84a7ec9 Compare January 22, 2025 03:09
@zichen-gan
Copy link
Author

DONE @anmolnar @kezhuw

Copy link
Member

@kezhuw kezhuw left a comment

Choose a reason for hiding this comment

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

The test failed in both github action and jenkins due to @Timeout(value = 30). I planed to drop it as the test has watcher.waitForConnected(ClientBase.CONNECTION_TIMEOUT) already.

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.

3 participants