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

Client should track current broker leader #1877

Merged
merged 4 commits into from
Mar 6, 2015
Merged

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Mar 6, 2015

No description provided.

@otoolep
Copy link
Contributor Author

otoolep commented Mar 6, 2015

@benbjohnson

This may not be a complete implementation, but should be an improvement.

@benbjohnson
Copy link
Contributor

Looks good, can you add a test?

@otoolep otoolep force-pushed the track_current_leader branch from 14a6382 to e7faeee Compare March 6, 2015 21:55
@otoolep
Copy link
Contributor Author

otoolep commented Mar 6, 2015

Cool, let me look into a test now.

@otoolep otoolep force-pushed the track_current_leader branch from e7faeee to 63aef03 Compare March 6, 2015 23:06
@otoolep
Copy link
Contributor Author

otoolep commented Mar 6, 2015

@benbjohnson -- can you take another look? I added tests, and also fixed a bug -- the entire redirect URL was getting set in the client, when it should only have been the host (and port if present).

@otoolep otoolep force-pushed the track_current_leader branch 2 times, most recently from 2a77f45 to 6983c4c Compare March 6, 2015 23:11
return
}

v, err := url.Parse(u.Scheme + "://" + u.Host)
Copy link
Contributor

Choose a reason for hiding this comment

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

It's way easier to just create a new url.URL:

v := &url.URL{Scheme: u.Scheme, Host: u.Host}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it -- I felt there had to be a better way.

@benbjohnson
Copy link
Contributor

One comment on the URL copy but otherwise lgtm.

@otoolep
Copy link
Contributor Author

otoolep commented Mar 6, 2015

Thanks for the feedback @benbjohnson -- made that one final change. I will merge on green.

@otoolep otoolep force-pushed the track_current_leader branch from 4b88c3d to fa4798e Compare March 6, 2015 23:16
@otoolep otoolep force-pushed the track_current_leader branch from fa4798e to 9a6f74c Compare March 6, 2015 23:19
@otoolep
Copy link
Contributor Author

otoolep commented Mar 6, 2015

Green build, merging now.

otoolep added a commit that referenced this pull request Mar 6, 2015
Client should track current broker leader
@otoolep otoolep merged commit 42bd35a into master Mar 6, 2015
@otoolep otoolep deleted the track_current_leader branch March 6, 2015 23:22
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