[infinispan-dev] Flag(s) being ignored on remote nodes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[infinispan-dev] Flag(s) being ignored on remote nodes

Sanne Grinovero
Using the following sequence, using REPL_SYNC:

[thread-A] nodeOne.put(K1, V1);
[thread-B] nodeTwo.startBatch();
[thread-B] nodeTwo.remove(K1);
[thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);

At the last line, thread-B is blocked waiting to end the batch to
after thread-A finished. This results in thread-A to throw a

"org.infinispan.util.concurrent.TimeoutException: Unable to acquire
lock after [500 milliseconds] on key"

Still if I run the same sequence of operation on two different threads
on the same node, this will work just fine and not throw any error:

[thread-A] nodeOne.put(K1, V1);
[thread-B] nodeOne.startBatch();
[thread-B] nodeOne.remove(K1);
[thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);

Looking into org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(InvocationContext,
WriteCommand), it seems that any Flag is not sent to remove nodes.
Actually the whole org.infinispan.remoting.rpc.RpcManager interface is
not interested in Flags.

This looks like to me a critical issue, or am I missing some design requirement?

Regards,
Sanne
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Flag(s) being ignored on remote nodes

Manik Surtani-2
Yes, this is a critical issue. Flags should be sent along with the command. Create a jira, I'll take a look.

Sent from my iPhone

On 9 Feb 2011, at 11:33, Sanne Grinovero <[hidden email]> wrote:

> Using the following sequence, using REPL_SYNC:
>
> [thread-A] nodeOne.put(K1, V1);
> [thread-B] nodeTwo.startBatch();
> [thread-B] nodeTwo.remove(K1);
> [thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
>
> At the last line, thread-B is blocked waiting to end the batch to
> after thread-A finished. This results in thread-A to throw a
>
> "org.infinispan.util.concurrent.TimeoutException: Unable to acquire
> lock after [500 milliseconds] on key"
>
> Still if I run the same sequence of operation on two different threads
> on the same node, this will work just fine and not throw any error:
>
> [thread-A] nodeOne.put(K1, V1);
> [thread-B] nodeOne.startBatch();
> [thread-B] nodeOne.remove(K1);
> [thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
>
> Looking into org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(InvocationContext,
> WriteCommand), it seems that any Flag is not sent to remove nodes.
> Actually the whole org.infinispan.remoting.rpc.RpcManager interface is
> not interested in Flags.
>
> This looks like to me a critical issue, or am I missing some design requirement?
>
> Regards,
> Sanne
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev

_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev
Reply | Threaded
Open this post in threaded view
|

Re: [infinispan-dev] Flag(s) being ignored on remote nodes

Sanne Grinovero
2011/2/9 Manik Surtani <[hidden email]>:
> Yes, this is a critical issue. Flags should be sent along with the command. Create a jira, I'll take a look.

Created:
https://issues.jboss.org/browse/ISPN-922

And please pull in my testcase:
https://github.com/Sanne/infinispan/commit/d790938be2893f6370ba17be2e04396fb23bf97b

Cheers,
Sanne

>
> Sent from my iPhone
>
> On 9 Feb 2011, at 11:33, Sanne Grinovero <[hidden email]> wrote:
>
>> Using the following sequence, using REPL_SYNC:
>>
>> [thread-A] nodeOne.put(K1, V1);
>> [thread-B] nodeTwo.startBatch();
>> [thread-B] nodeTwo.remove(K1);
>> [thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
>>
>> At the last line, thread-B is blocked waiting to end the batch to
>> after thread-A finished. This results in thread-A to throw a
>>
>> "org.infinispan.util.concurrent.TimeoutException: Unable to acquire
>> lock after [500 milliseconds] on key"
>>
>> Still if I run the same sequence of operation on two different threads
>> on the same node, this will work just fine and not throw any error:
>>
>> [thread-A] nodeOne.put(K1, V1);
>> [thread-B] nodeOne.startBatch();
>> [thread-B] nodeOne.remove(K1);
>> [thread-A] nodeOne.withFlags(Flag.SKIP_LOCKING).remove(K1);
>>
>> Looking into org.infinispan.interceptors.ReplicationInterceptor.handleCrudMethod(InvocationContext,
>> WriteCommand), it seems that any Flag is not sent to remove nodes.
>> Actually the whole org.infinispan.remoting.rpc.RpcManager interface is
>> not interested in Flags.
>>
>> This looks like to me a critical issue, or am I missing some design requirement?
>>
>> Regards,
>> Sanne
>> _______________________________________________
>> infinispan-dev mailing list
>> [hidden email]
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> [hidden email]
> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
_______________________________________________
infinispan-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/infinispan-dev