I'm having a problem where I'm seeing the following warnings and
exception in my memcached related unit tests. I'm using spymemcached
2.7.
2011-07-01 11:52:42.825 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@5faecf45
2011-07-01 11:52:43.068 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@3c818737
2011-07-01 11:52:43.217 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@17b68215
2011-07-01 11:52:43.365 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@12627bc7
2011-07-01 11:52:43.366 WARN net.spy.memcached.MemcachedConnection:
handling node for operation is not set
org.scalatest.junit.JUnitTestFailedError: java.lang.RuntimeException:
Cancelled
at org.scalatest.junit.AssertionsForJUnit
$class.newAssertionFailedException(AssertionsForJUnit.scala:100)
I'm creating the ConnectionFactoryBuilder like below (via Scala):
val builder = new ConnectionFactoryBuilder
builder.setFailureMode(FailureMode.Cancel)
builder.setProtocol(Protocol.BINARY)
builder.setLocatorType(Locator.CONSISTENT)
builder.setHashAlg(HashAlgorithm.KETAMA_HASH)
I'm using FailureMode.Cancel to help diagnose the problem. I'm
currently using one memcached server on my localhost for the tests. If
I set the FailureMode to Retry then everything works fine. I noticed
that "handling node for operation is not set" appears when
operation.getHandlingNode() returns null. My memcached server is not
going down, but it seems like the client believes it is? Any ideas?
Thanks,
Taylor