[infinispan-dev] DIST-SYNC, put(), a problem and a solution
Pedro Ruivo
pedro at infinispan.org
Wed Aug 6 11:42:23 EDT 2014
On 08/06/2014 04:19 PM, Bela Ban wrote:
>
> I think this can be used for both cases; however, I think either Sanne's
> solution of using seqnos *per key* and updating in the order of seqnos
> or using Pedro's total order impl are probably better solutions.
>
> I'm not pretending these solutions are final (e.g. Sanne's solution
> needs more thought when multiple keys are involved), but we should at
> least acknowledge the issue exists, create a JIRA to prioritize it and
> then start discussing solutions.
>
I'm not sure if Sanne's suggestion will work. Imagine the follow scenario:
* a thread pool with a single thread (for simplicity)
* 3 nodes, A, B and C.
* A is the primary owner of K1 and backup owner of K2
* B is the primary owner of K2 and backup owner if K1
NodeC requests two puts concurrently to K1 and K2. Both NodeA and NodeB
will process the request, assign a sequence number and send it to the
backup owners. In this case, we have a deadlock again because the send
to the backup owner is synchronous.
cause: The thread pool is exhausted because the thread is blocking
waiting for the reply from the backup owner.
Any thoughts how can we solve this? Also, will the state transfer need
to be adapted to the new behaviour?
Pedro
More information about the infinispan-dev
mailing list