-
Notifications
You must be signed in to change notification settings - Fork 32
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
Issue 4 #5
Issue 4 #5
Conversation
- Only reconnect to new nsqd instances in lookupd response, not all of them - Disconnect from removed nsqd instances in lookupd response. - Connections with errors call back to NSQReader.remove() (Connection.close() does not do this implicitly). - Add a unit test for NSQReader (and MockConnection class) - Add a unit test for SyncResponseReader (and MockHandler class) - Add some class and method comments - Fix typo in public method 'Connection.decodeMesage()' Refs Issue nsqio#3
import java.io.DataInputStream; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not import * here? We're pretty strict here at Bitly about explicit imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That must be an IDE setting. I will find it and kill it.
- New MessageCodec class - Also remove all import foo.* in non-test code. Refs Issue nsqio#4
So, I actually think that we should be leaving the lookupd response logic as it was. We never really want to disconnect from a nsqd if it is absent from a lookupd response, because the correct client behavior is to connect to the union of all the responses from the lookupds that it queries, in case existence of a producer has not propagated to all the lookupds. We also guard against attempting to make duplicate connections by checking if a connection already exists inside the |
Ah, I missed this in the old version, which makes a world of difference:
return; I see your point about not removing a connection just because a single Andy On Tue, Apr 16, 2013 at 5:04 PM, Dan Frank [email protected] wrote:
|
Hi @werkshy , trying to do a little summer cleaning around here. I think there's some valuable stuff in this PR, but as I said above I don't think that the lookupd logic should be changed. I may spend some time pulling out some changes from here individually, so keep your eyes peeled |
👻 |
Fix for issue #4, single commit on top of previous pull request.