[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16764746#comment-16764746 ] Nitin Gupta commented on OAK-8035: -- [~teofili] - I have attached a patch for this - [^OAK-8035.patch] . This also includes the test case . > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765918#comment-16765918 ] Tommaso Teofili commented on OAK-8035: -- the changes look good to me. [~tmueller] would you mind double checking if the changes in the per index plan cost estimation are good ? > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765946#comment-16765946 ] Thomas Mueller commented on OAK-8035: - There are some things I would change: * The declaration "IndexPlan almostBestPlan" doesn't belong there. Please move below the comment "track similar costs" and the related declarations. * Please fix the formatting in "String.format("selected index {%s} with plan [%s] and {%s} ...". The {} were needed for LOG.debug, they are not needed for String.format. Also, a space is missing before "have similar ". Regards, Thomas > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16765981#comment-16765981 ] Nitin Gupta commented on OAK-8035: -- [~tmueller] - updated patch - [^OAK-8035_2.patch] as per your suggestions . cc : [~teofili] > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16766971#comment-16766971 ] Thomas Mueller commented on OAK-8035: - The patch looks good to me. [~nitigup] you don't have commit rights? I or [~teofili] can commit it if you like. > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16767015#comment-16767015 ] Nitin Gupta commented on OAK-8035: -- [~tmueller] - yup - I don't have commit rights . This is actually my first contribution here. So - yeah you or [~teofili] can commit for me . Thanks a lot for the help . > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769122#comment-16769122 ] Tommaso Teofili commented on OAK-8035: -- [~nitigup] I've committed your patch in r1853626. Thanks for your contribution ! :-) > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769438#comment-16769438 ] Julian Reschke commented on OAK-8035: - With this change, the build fails for me: {noformat} [WARNING] Corrupted STDOUT by directly writing to native stream in forked JVM 1. See FAQ web page and the dump file /mnt/c/projects/apache/oak/trunk/oak-core/target/surefire-reports/2019-02-15T15-44-24_303-jvmRun1.dumpstream [ERROR] Tests run: 42, Failures: 0, Errors: 18, Skipped: 0, Time elapsed: 80.928 s <<< FAILURE! - in org.apache.jackrabbit.oak.security.authorization.accesscontrol.AccessControlImporterIgnoreTest [ERROR] testImportWithRestrictionNodeInfo(org.apache.jackrabbit.oak.security.authorization.accesscontrol.AccessControlImporterIgnoreTest) Time elapsed: 9.922 s <<< ERROR! java.lang.OutOfMemoryError: Java heap space [ERROR] testImportWithRestrictionNodeInfo(org.apache.jackrabbit.oak.security.authorization.accesscontrol.AccessControlImporterIgnoreTest) Time elapsed: 9.922 s <<< ERROR! java.lang.NullPointerException [ERROR] testEndChildInfoIncompleteAce(org.apache.jackrabbit.oak.security.authorization.accesscontrol.AccessControlImporterIgnoreTest) Time elapsed: 5.238 s <<< ERROR! java.lang.OutOfMemoryError: Java heap space {noformat} > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Fix For: 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769464#comment-16769464 ] Tommaso Teofili commented on OAK-8035: -- I had tried the whole build and it passed for me, not sure how this could be related, however I'll double check. > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Fix For: 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769468#comment-16769468 ] Julian Reschke commented on OAK-8035: - It seems to be memory-related. I'm now trying with the change in place but the test case removed. > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Fix For: 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769518#comment-16769518 ] Nitin Gupta commented on OAK-8035: -- [~reschke] - thanks for pointing out the problem and sorry for the trouble . The issue was that the list appender in the test needed to be explicitly stopped otherwise it led to memory leak . Here's the patch to fix this [^OAK-8035_3.patch] - I don't have commit rights - can you please apply this ? > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Nitin Gupta >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769620#comment-16769620 ] Julian Reschke commented on OAK-8035: - trunk: [r1853626|http://svn.apache.org/r1853626] > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769622#comment-16769622 ] Julian Reschke commented on OAK-8035: - Patch for the test applied with minor cosmetic modifications. > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769628#comment-16769628 ] Nitin Gupta commented on OAK-8035: -- [~reschke] - thanks > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771731#comment-16771731 ] Julian Reschke commented on OAK-8035: - FWIW, I find it unfortunate that we introduce a new test dependency here ([http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/pom.xml?r1=1850878&r2=1853626&pathrev=1853626&diff_format=h).] Is this really needed? And if it is, shouldn't we use the latest version? (see https://mvnrepository.com/artifact/org.assertj/assertj-core) > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771822#comment-16771822 ] Nitin Gupta commented on OAK-8035: -- [~reschke] - Just find it a bit more fluent with assertions - makes the test code a bit more clean to look at and I used the version that I had used before to make sure it works as I expect . But I can remove it - I also need to refactor the test to use the LogCustomizer as you suggested - so will remove this dependency also along with that. But just for my future reference - do we not introduce any new test dependencies in oak ? or is there some RTC process that I bypassed and needed to follow before introducing one ? > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771825#comment-16771825 ] Julian Reschke commented on OAK-8035: - {quote}[~reschke] - Just find it a bit more fluent with assertions - makes the test code a bit more clean to look at and I used the version that I had used before to make sure it works as I expect . But I can remove it - I also need to refactor the test to use the LogCustomizer as you suggested - so will remove this dependency also along with that. {quote} Done that already, and I don't thik the test is harder to read. Will apply patch soonish. bq. But just for my future reference - do we not introduce any new test dependencies in oak ? or is there some RTC process that I bypassed and needed to follow before introducing one ? No, adding new test dependencies is fine. We just should do it consciously and coordinated. My preference would be not to add new dependencies just because somebody liked a particular library. In the end, the whole team needs to be able to support the code in the future. > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771827#comment-16771827 ] Julian Reschke commented on OAK-8035: - trunk: [r1853872|http://svn.apache.org/r1853872] [r1853659|http://svn.apache.org/r1853659] [r1853626|http://svn.apache.org/r1853626] > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-8035) Debug logging when two or more indices have same or very close cost amounts doesn't work in case both indices belong to the same type of Query Index
[ https://issues.apache.org/jira/browse/OAK-8035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16771857#comment-16771857 ] Nitin Gupta commented on OAK-8035: -- [~reschke] - agreed . I was just about to add this patch here [^OAK-8035_4.patch] for the changes as per your suggestions - but you beat me to it :) > Debug logging when two or more indices have same or very close cost amounts > doesn't work in case both indices belong to the same type of Query Index > > > Key: OAK-8035 > URL: https://issues.apache.org/jira/browse/OAK-8035 > Project: Jackrabbit Oak > Issue Type: Bug > Components: query >Reporter: Nitin Gupta >Assignee: Julian Reschke >Priority: Major > Fix For: 1.12, 1.11.0 > > Attachments: OAK-8035.patch, OAK-8035_2.patch, OAK-8035_3.patch, > OAK-8035_4.patch > > > Steps to reproduce - > # You would need two index definitions of same query index type , let's say > fullText index , having similar cost evaluations. > # Now while the index plan is evaluated you will notice that there should > have been a debug log saying that selected index has similar cost - this > serves as an important warning to either change the index definitions or the > query > ([https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1069#L1072)] > > However If we have a look at this code block here - > [https://github.com/apache/jackrabbit-oak/blob/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/QueryImpl.java#L1017#L1041] > , there is no comparison for near best costs for index plans having same > query index type . > > cc : [~teofili] -- This message was sent by Atlassian JIRA (v7.6.3#76005)