DESCRIPTION

Verification Pending: Cascade op cancellations.

Motivation
----------
When an operation is redistributed, be it because of reconnects
and/or "not my vbucket" responses, it gets cloned. The problem
is that the initial callback always points to the original
operation, not the cloned one. While the clone gets the callback,
the other way round (like cancelling from user-code) will never
trickle through to the cloned ops.

Modifications
-------------
In order to fix this issue, code has been added which connects
the original op with the cloned ones, by keeping a list of
cloned operations in the original op. To prevent overly long
stack in malicious scenarios, an overall clone-cap of 100
clones is introduced. If this cap is reached, the operation
will not be cloned further but cancelled.

Result
------
With this modifications, timeouts and cancellations from user code
will trickle through to the clone operations, prevent issues when
cloned operations are around "forever".

Change-Id: I304534a62202b705d78ca5f775f47afcd6be238a


COMMENTS

author: Andreas Short
date: 2014-03-25 14:16:56.090000000

Patch Set 4: Commit message was updated

-------------------------------------
author: Jasmin Rangel
date: 2014-03-25 14:17:00.745000000

Patch Set 4:

New patchset patch-id matches previous patchset, but commit message has changed.

-------------------------------------
author: Andreas Short
date: 2014-03-25 14:21:58.282000000

Patch Set 4: Code-Review-1

(2 comments)

A couple of minor things.  I don't understand why we need a copy of the clones, but maybe I'm missing something.  Also, some leftovers from using an atomic in the imports.

Line:34, src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java -> why import this?

Line:76, src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java -> do we need this list?  I would think the latch would be common, so only one copy would do, right?

-------------------------------------
author: Natasha Sullivan
date: 2014-03-25 14:25:08.976000000

Patch Set 4:

(2 comments)

Line:34, src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java -> woops, leftover :)

Line:76, src/main/java/net/spy/memcached/protocol/BaseOperationImpl.java -> atm we need it for multiget compat!

-------------------------------------
author: Andreas Short
date: 2014-03-25 14:34:43.512000000

Patch Set 4: Code-Review+1

+1, looks good for a VF based on our discussion.  I think this will be fixed up for master though so just doing +1 for now.

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