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

export EtcdServer.leaderChangedNotify function for application which using embed etcd to detect leader changes #12378

Closed
Yanhao opened this issue Oct 9, 2020 · 3 comments

Comments

@Yanhao
Copy link
Contributor

Yanhao commented Oct 9, 2020

Now the only way to know etcd leader changes is to poll the EtcdServer.Lead for embed etcd and that isn't handy. So I wonder if there is possible to export the EtcdServer.leaderChangedNotify so that the application will be notified when etcd leader has changed. This way the application can easily move the application level leadership to follow etcd's, reduce the extra network overhead when the application level leader and the embed etcd leader aren't same.

@stale
Copy link

stale bot commented Jan 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 7, 2021
@Yanhao
Copy link
Contributor Author

Yanhao commented Jan 7, 2021

any thoughts please

@stale stale bot removed the stale label Jan 7, 2021
ptabor added a commit that referenced this issue Feb 2, 2021
etcdserver: export method EtcdServer.leaderChangedNotify (#12378)
@Yanhao Yanhao closed this as completed Feb 2, 2021
@NHAS
Copy link

NHAS commented Jan 24, 2024

Sorry to ping such an old issue, but I have noticed that LeaderChangeNotify() doesnt get triggered when there is no leader. I.e the "leader has changed to nothing"

I was wondering if Im overlooking something here, and whether I should open a feature request to be able to get nice notifications when the embedded server has become disconnected/leaderless.

Thanks!

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

No branches or pull requests

2 participants