[jira] [Moved] (OAK-465) PropertyIndex uses TraversingCursor but should not

2012-11-22 Thread Jukka Zitting (JIRA)

 [ 
https://issues.apache.org/jira/browse/OAK-465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jukka Zitting moved JCR-3460 to OAK-465:


Component/s: (was: query)
 query
   Workflow: no-reopen-closed  (was: no-reopen-closed, patch-avail)
Key: OAK-465  (was: JCR-3460)
Project: Jackrabbit Oak  (was: Jackrabbit Content Repository)

 PropertyIndex uses TraversingCursor but should not
 --

 Key: OAK-465
 URL: https://issues.apache.org/jira/browse/OAK-465
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: query
Reporter: Thomas Mueller
Assignee: Thomas Mueller

 The org.apache.jackrabbit.oak.plugins.index.property.PropertyIndex uses the 
 traversing cursor (that traverses over the whole repository) when there is no 
 index. This is not how the index mechanism is supposed to work: if there is 
 no property index, then the cost function of the property index should return 
 infinity or max value, so that the property index isn't used.
 According to my test the PropertyIndex never really falls back to traversing, 
 so this might just be defensive programming. However, in this case it would 
 be better if the code would throw an exception, otherwise we risk not seeing 
 the bug in the PropertyIndex cost method.

--
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


Re: [jira] [Moved] (OAK-465) PropertyIndex uses TraversingCursor but should not

2012-11-22 Thread Thomas Mueller
Hi,

Oh, I made a JCR issue not an OAK issue. Thanks Jukka for fixing this!

Regards,
Thomas



On 11/22/12 1:30 PM, Jukka Zitting (JIRA) j...@apache.org wrote:


 [ 
https://issues.apache.org/jira/browse/OAK-465?page=com.atlassian.jira.plug
in.system.issuetabpanels:all-tabpanel ]

Jukka Zitting moved JCR-3460 to OAK-465:


Component/s: (was: query)
 query
   Workflow: no-reopen-closed  (was: no-reopen-closed, patch-avail)
Key: OAK-465  (was: JCR-3460)
Project: Jackrabbit Oak  (was: Jackrabbit Content Repository)

 PropertyIndex uses TraversingCursor but should not
 --

 Key: OAK-465
 URL: https://issues.apache.org/jira/browse/OAK-465
 Project: Jackrabbit Oak
  Issue Type: Bug
  Components: query
Reporter: Thomas Mueller
Assignee: Thomas Mueller

 The org.apache.jackrabbit.oak.plugins.index.property.PropertyIndex uses
the traversing cursor (that traverses over the whole repository) when
there is no index. This is not how the index mechanism is supposed to
work: if there is no property index, then the cost function of the
property index should return infinity or max value, so that the property
index isn't used.
 According to my test the PropertyIndex never really falls back to
traversing, so this might just be defensive programming. However, in
this case it would be better if the code would throw an exception,
otherwise we risk not seeing the bug in the PropertyIndex cost method.

--
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