You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Xiaohua Lu (JIRA)" <ji...@apache.org> on 2007/02/20 17:47:05 UTC

[jira] Created: (JCR-758) QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager

QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager
-----------------------------------------------------------------------------------------------------------------

                 Key: JCR-758
                 URL: https://issues.apache.org/jira/browse/JCR-758
             Project: Jackrabbit
          Issue Type: Bug
    Affects Versions: 1.2.1
            Reporter: Xiaohua Lu


The background is I have implemented my own AccessManager. After executing a query and get back the RowIterator from the result, if I call rowiterator.getSize, it will return the size of all nodes matching my query (without honoring the access control) . But if I iterate through the result, I find lots of duplicates in the results; and if I filter out those duplicate, the final result is quite off the original number from RowIteartor.getSize()

BTW, I also disabled Doc Order sorting.

 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JCR-758) QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-758:
------------------------------

          Component/s: query
        Fix Version/s: 1.2.3
    Affects Version/s: 1.2.2

Tagged for the 1.2.3 release.

> QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-758
>                 URL: https://issues.apache.org/jira/browse/JCR-758
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 1.2.1, 1.2.2
>            Reporter: Xiaohua Lu
>             Fix For: 1.2.3
>
>
> The background is I have implemented my own AccessManager. After executing a query and get back the RowIterator from the result, if I call rowiterator.getSize, it will return the size of all nodes matching my query (without honoring the access control) . But if I iterate through the result, I find lots of duplicates in the results; and if I filter out those duplicate, the final result is quite off the original number from RowIteartor.getSize()
> BTW, I also disabled Doc Order sorting.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-758) QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474497 ] 

Marcel Reutegger commented on JCR-758:
--------------------------------------

Can you please provide a test case that shows this behaviour? Thank you.

> QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-758
>                 URL: https://issues.apache.org/jira/browse/JCR-758
>             Project: Jackrabbit
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Xiaohua Lu
>
> The background is I have implemented my own AccessManager. After executing a query and get back the RowIterator from the result, if I call rowiterator.getSize, it will return the size of all nodes matching my query (without honoring the access control) . But if I iterate through the result, I find lots of duplicates in the results; and if I filter out those duplicate, the final result is quite off the original number from RowIteartor.getSize()
> BTW, I also disabled Doc Order sorting.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-758) QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-758?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger resolved JCR-758.
----------------------------------

    Resolution: Fixed

Forbidden nodes are not tracked correctly in the result set.

Fixed in trunk: 509944

Xiaohua and Paco, thank you for reporting this bug and the description how to reproduce the issue.

Jukka, if possible, this fix should also go into the next patch release.

> QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-758
>                 URL: https://issues.apache.org/jira/browse/JCR-758
>             Project: Jackrabbit
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Xiaohua Lu
>
> The background is I have implemented my own AccessManager. After executing a query and get back the RowIterator from the result, if I call rowiterator.getSize, it will return the size of all nodes matching my query (without honoring the access control) . But if I iterate through the result, I find lots of duplicates in the results; and if I filter out those duplicate, the final result is quite off the original number from RowIteartor.getSize()
> BTW, I also disabled Doc Order sorting.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JCR-758) QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager

Posted by "Paco Avila (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12474567 ] 

Paco Avila commented on JCR-758:
--------------------------------

Big news! I have the same weird issue. I am trying to make a minimal test case. The duplicate nodes are nodes which the quering session have no permissions and  the returned node is a duplicate of the last returned node where the session can read. It is a bit confusing to explain and my english is poor.

If the query is done by a "super user" session, the returned nodes are the good nodes. If the query is performed by a "limited user" session, the number of returned nodes are the same (amazing!!), but the "forbidden" nodes are not returned (of course) and these nodes are "filled" with the other readed nodes.

> QueryResult's RowIterator.getSize returned the wrong size of the results after I implemented my own AccessManager
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-758
>                 URL: https://issues.apache.org/jira/browse/JCR-758
>             Project: Jackrabbit
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Xiaohua Lu
>
> The background is I have implemented my own AccessManager. After executing a query and get back the RowIterator from the result, if I call rowiterator.getSize, it will return the size of all nodes matching my query (without honoring the access control) . But if I iterate through the result, I find lots of duplicates in the results; and if I filter out those duplicate, the final result is quite off the original number from RowIteartor.getSize()
> BTW, I also disabled Doc Order sorting.
>  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.