Commit 3ba49ca
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 <michael.nitschinger@couchbase.com>
Reviewed-by: Matt Ingenthron <matt@couchbase.com>1 parent 73cd03e commit 3ba49ca
2 files changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1418 | 1418 | | |
1419 | 1419 | | |
1420 | 1420 | | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1421 | 1431 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
| 350 | + | |
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| |||
0 commit comments