[infinispan-dev] Indexing deadlock (solution suggestion)

Radim Vansa rvansa at redhat.com
Wed Dec 17 12:58:40 EST 2014


Hi,

what I was suggesting in the call in order to get rid of the indexing: 
Currently we're doing this:

1. thread on primary owner executes the write and sends indexing request 
(synchronous RPC) to index master, waits for the response
2. remote/OOB thread on indexing master enqueues the indexing request 
and waits
3. indexing thread (on indexing master) retrieves the request, processes 
it and wakes up the waiting remote/OOB thread
4. remote/OOB thread sends RPC response
5. primary owner receives the RPC response (in OOB thread, inside 
JGroups) and wakes up the thread sending the RPC

What I suggest is that:
1. thread on primary owner executes the write and sends indexing request 
as asynchronous RPC (single message) to index master, and waits on a 
custom synchronization primitive
2. remote/OOB thread on indexing master enqueues the indexing request 
and returns back to the threadpool
3. indexing thread (on indexing master) retrieves the request, processes 
it and sends asynchronouse RPC (again single message) to the primary owner
4. primary owner (in OOB thread) receives the message and wakes up 
thread waiting on the custom synchronization primitive (in Infinispan)

My 2c

Radim

-- 
Radim Vansa <rvansa at redhat.com>
JBoss DataGrid QA



More information about the infinispan-dev mailing list