Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SPY-160: Queue retry op instead of redistributing it immediately.
Motivation ---------- After making the original SPY-160 changes, the ops were correctly redistributed, but if the latch never gets counted down it gets recursively distributed and added. Example: at net.spy.memcached.protocol.TCPMemcachedNodeImpl.addOp(TCPMemcachedNodeImpl.java:344) at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:1206) at net.spy.memcached.MemcachedConnection.redistributeOperation(MemcachedConnection.java:994) at net.spy.memcached.protocol.TCPMemcachedNodeImpl.addOp(TCPMemcachedNodeImpl.java:350) at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:1206) at net.spy.memcached.MemcachedConnection.redistributeOperation(MemcachedConnection.java:994) at net.spy.memcached.protocol.TCPMemcachedNodeImpl.addOp(TCPMemcachedNodeImpl.java:350) at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:1206) at net.spy.memcached.MemcachedConnection.redistributeOperation(MemcachedConnection.java:994) Modifications ------------- The changeset, instead of redistributing right now, adds the operation to the retry queue which means it will be handled eventually, but gives the IO thread a chance to run other tasks (including retreiving auth response information). Result ------ The operation is queued and is not blocking the IO thread. Change-Id: I73a8e77255a54bceeb929febcadb0e555febdd67 Reviewed-on: http://review.couchbase.org/34938 Tested-by: Michael Nitschinger <[email protected]> Reviewed-by: Matt Ingenthron <[email protected]>
- Loading branch information