DESCRIPTION

JCBC-070/SPY-102: Fix Authentication to non-default bucket

Authentication to newly connected nodes
was happening in the wrong order on the jcbc
side.

The KetamaNodeLocator was not updating the Node
list that was obtained by getAll().

There were other issues in the code that have
been corrected with some defensive
programming.

Manual test for the fix is included. Following
the directions in readme.txt and executing the
scripts (or something along those lines) would
recreate the issue/fix.

The manual tests are not in tar ball format.

Removed the class files. The shell scripts can
be run after the directions in readme.txt is
followed.

Cleaned up the Java code as well.

Change-Id: I3b3198607d42610d71c42c5cf2eeadf55d274f27


COMMENTS

author: Jeffrey Roth
date: 2012-10-15 16:12:42.100000000

Uploaded patch set 6.

-------------------------------------
author: Andreas Short
date: 2012-10-17 17:51:58.710000000

Patch Set 6: (7 inline comments)

Closer, but I'm still -2 on this for a couple of reasons.

The queueReconnect try/catch seems better in some ways, but it would mean we wouldn't actually queue reconnects if an IOException occurs.  I don't know what all scenarios lead to an IOException when trying to close the SocketAddress, but at the very least I know we don't just want to log a warning and move on.

I'm also -2 because at least one other important log message doesn't make sense to me.  Please either fix the log message or clarify.

There are also a ton of whitespace issues in the manual test.  Some of the commented out code is gone.

Thanks for opening the issue too.  It needs a better description though.

Line:24, src/test/manual/spy-102/cache/prototype/CouchCacheConnector.java -> tons of whitespace issues in this file

Line:377, src/main/java/net/spy/memcached/MemcachedConnection.java -> "Could not finish connect on connected channel" seems like an odd assert message to me.  I'm okay with it, but still seems odd.

Line:441, src/main/java/net/spy/memcached/MemcachedConnection.java -> might be good to indicate that the client will retry in this warning log.  

It may be good to think about what action we want the user to take in the case of warning and putting that in there.

Line:517, src/main/java/net/spy/memcached/MemcachedConnection.java -> if this fails, we won't reconnect, right?  shouldn't this be logged as something more severe?

Line:2105, src/main/java/net/spy/memcached/MemcachedClient.java -> I'm having trouble reading this log message and I'm not sure if it should be warn.  That's not to say it shouldn't be.  Can you clarify here though?

We're looking fro the node, and if it exists, we're authenticating it.

If it does not exist, we're logging:
Connection established Not auth. 0.0.0.0:11210 to ....

Does that log message say what we want it to say?

Line:15, src/test/manual/spy-102/readme.txt -> whitespace issues in here, and this comment isn't really necessary, I don't think.

Line:10, src/test/manual/spy-102/build2.sh -> trailing whitespace

-------------------------------------
