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

Remove redundant srvs shuffle #94

Closed
wants to merge 1 commit into from

Conversation

0xkookoo
Copy link

@0xkookoo 0xkookoo commented Oct 3, 2022

We have servers shuffle in github.com/samuel/go-zookeeper/conn.go:191 and github.com/samuel/go-zookeeper/dnshostprovider.go:53, so one of them should be removed. The shuffle logic is more proper to keep inside the real connect component, that's why I choose to remove the outside one.

We have servers shuffle in `github.com/samuel/go-zookeeper/conn.go:191` and `github.com/samuel/go-zookeeper/dnshostprovider.go:53`, so one of them should be removed. The shuffle logic is more proper to keep inside the real connect component, that's why I choose to remove the outside one.
Copy link

codecov bot commented Apr 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.98%. Comparing base (3ac3132) to head (a6fb885).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   77.08%   76.98%   -0.10%     
==========================================
  Files           7        7              
  Lines        1322     1321       -1     
==========================================
- Hits         1019     1017       -2     
  Misses        212      212              
- Partials       91       92       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeffbean
Copy link

this change would be a breaking behavioral change for clients that provide their own hostprovider that does not shuffle before Init. I also would not want to keep the shuffle in the conn.go as you are correct in that the ordering should be totally handled in the hostprovider.

This would need to be cleaned up in a v2.

Closing PR, tracked the change intent in #131

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.

2 participants