[infinispan-issues] [JBoss JIRA] (ISPN-3795) QueryInterceptor incorrectly relies on the return value of a RemoveCommand

Sanne Grinovero (JIRA) issues at jboss.org
Wed Dec 18 05:57:32 EST 2013


    [ https://issues.jboss.org/browse/ISPN-3795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12932331#comment-12932331 ] 

Sanne Grinovero commented on ISPN-3795:
---------------------------------------

I agree  but that's a known limitation: you might remember the problem with _putAll_ ...
We don't expect people to use Flags randomly and getting away with it unpunished ;-)

As a side note, I've been toying with the idea of looking if the IGNORE_PREVIOUS_VALUES or variations such as the one skipping load from a CacheStore is set, to see if I could use the ADD INDEX command rather than UPDATE .. (from the chat we had on github), but that seems to get very tricky, especially if you start considering corner scenarios like flag behaviour during state transfer / eviction and others.

I think the QueryInterceptor needs to play safe by default, but yes if the user forces Flags all bets are off.. he better knows what he's doing. Side note: not so sure we should document all these flags as public APIs.
                
> QueryInterceptor incorrectly relies on the return value of a RemoveCommand
> --------------------------------------------------------------------------
>
>                 Key: ISPN-3795
>                 URL: https://issues.jboss.org/browse/ISPN-3795
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Querying
>    Affects Versions: 6.0.0.Final
>            Reporter: Dan Berindei
>            Assignee: Sanne Grinovero
>             Fix For: 7.0.0.Final
>
>
> QueryInterceptor uses the return value from RemoveCommand/ReplaceCommand to remove the value from the index.
> But both RemoveCommand and ReplaceCommand have a variant with an expected value parameter, and this variant return a boolean value instead of the removed/replaced value. In that case, the previous value won't be removed from the index.
> QueryInterceptor should probably use the previous value from the context entries to update the index instead.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list