[infinispan-dev] Bug in queryInterceptor?

Navin Surtani nsurtani at redhat.com
Wed Jul 21 07:01:53 EDT 2010


On 20/07/10 22:56, Emmanuel Bernard wrote:
> If the interceptor can't differentiate a creation from an update then you are correct, this should be adjusted.

+1. You're right I think the interceptor should be able to differentiate 
between the two. It's a small fix I think.

Manik, do you mind if I create a JIRA for this and sort it out myself?

>
> On 20 juil. 2010, at 22:27, Israel Lacerra<israeldl at gmail.com>  wrote:
>
>> Hi guys,
>>
>> Looks like in QueryInterceptor.addToIndexes the correct workType to perform on searchFactory is WorkType.UPDATE.
>>
>> If the workType is ADD, then when we put a new object on a old key (using cache.put), the old object remains in the index.

In terms of the indexing, the same key that you use in the cache is 
pretty much stored as the key. Strictly it's the key + some metadata. So 
as long as you don't do something like: -

int key1 = 5;
cache.put(key1, value1);

double key1 = 5;
cache.put(key1, value2);

This way, the interceptor will think that two separate keys are being 
used. Even though they are both the same number, when the String 
representation is built, they will have metadata about the type and 
hence be different String representations.

I guess my point here is that there are cases where we need to treat 
this issue with perhaps a little bit more care. The other gurus here 
will probably have a better idea on this.

>>
>> Am I wrong?
>>
>>
>> Israel
>> _______________________________________________
>> infinispan-dev mailing list
>> infinispan-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/infinispan-dev
>
> _______________________________________________
> infinispan-dev mailing list
> infinispan-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/infinispan-dev


-- 
Navin Surtani
Intern Infinispan


More information about the infinispan-dev mailing list