[ 
https://issues.apache.org/jira/browse/GEODE-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409677#comment-15409677
 ] 

Jason Huynh commented on GEODE-1676:
------------------------------------

The problem was that the set used to store the not equals objects was being 
shared/modified by each index iterator.  This was an optimization to remove 
keys from this set once they were seen.  This works for a replicated regions 
but for partitioned regions, the same exact set was passed to the next bucket, 
but now it was completely empty.  Now we copy the original set for each index 
iterator.

The second issue is that the pdx strings were not being properly compared to 
strings for Compact Range Indexes.

More information about the optimization:
* Imagine the index has keys 0->10 and keysToRemove has keys 3,6,9
* As we traverse the index iterator (0->10) we have to compare the key to each 
key in the keysToRemove
* When the index iterator returns 3, it is compared to the KeysToRemove, 
because it is in the set, we skip over it.  We also remove it from the 
keysToRemove, so the following .next() calls do not have to compare against 3 
any longer because we know we've already matched it and ignored it.





> Multiple Not Equals in query with Compact Range Index returns incorrect 
> results
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-1676
>                 URL: https://issues.apache.org/jira/browse/GEODE-1676
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: Jason Huynh
>            Assignee: Jason Huynh
>
> When there are multiple not equals in a query, when running against a compact 
> range index and a PR, results that should be excluded due to the not equals, 
> are instead returned.
> There is also a problem with PDX String comparisons with String wrt Compact 
> Range Index



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to