[xwiki-devs] XWikiRights storage… better now?
Dear XWiki developers, again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user. I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me. Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do. thanks in advance. Paul
It's a new implementation with a lot of caching but the model did not changed. On Thu, Sep 18, 2014 at 10:47 AM, Paul Libbrecht <[email protected]> wrote:
Dear XWiki developers,
again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user.
I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me.
Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do.
thanks in advance.
Paul _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Whenever you do a LIKE you need to check your indexes in your DB to tune the query to be fast. Thanks -Vincent On 18 Sep 2014 at 11:00:36, Thomas Mortagne ([email protected](mailto:[email protected])) wrote:
It's a new implementation with a lot of caching but the model did not changed.
On Thu, Sep 18, 2014 at 10:47 AM, Paul Libbrecht wrote:
Dear XWiki developers,
again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user.
I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me.
Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do.
thanks in advance.
Paul
Just to be clear you must avoid table scans at all costs. -Vincent On 18 Sep 2014 at 11:14:20, [email protected] ([email protected](mailto:[email protected])) wrote:
Whenever you do a LIKE you need to check your indexes in your DB to tune the query to be fast.
Thanks -Vincent
On 18 Sep 2014 at 11:00:36, Thomas Mortagne ([email protected](mailto:[email protected])) wrote:
It's a new implementation with a lot of caching but the model did not changed.
On Thu, Sep 18, 2014 at 10:47 AM, Paul Libbrecht wrote:
Dear XWiki developers,
again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user.
I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me.
Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do.
thanks in advance.
Paul
Didn't we stop storing members of a group that way a long time ago? (implying the LIKE queries are strictly for backward compat) On 09/18/2014 11:14 AM, [email protected] wrote:
Whenever you do a LIKE you need to check your indexes in your DB to tune the query to be fast.
Thanks -Vincent
On 18 Sep 2014 at 11:00:36, Thomas Mortagne ([email protected](mailto:[email protected])) wrote:
It's a new implementation with a lot of caching but the model did not changed.
On Thu, Sep 18, 2014 at 10:47 AM, Paul Libbrecht wrote:
Dear XWiki developers,
again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user.
I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me.
Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do.
thanks in advance.
Paul
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
We stopped storing it but it's still supported (we don't log warning or stuff like that when something is still doing it) which mean some extension might be doing it and of course existing rights might contain it. The question is do we want to stop the support and automatically migrate existing stuff (and maybe break some existing extensions). On Thu, Sep 18, 2014 at 11:16 AM, Caleb James DeLisle <[email protected]> wrote:
Didn't we stop storing members of a group that way a long time ago? (implying the LIKE queries are strictly for backward compat)
On 09/18/2014 11:14 AM, [email protected] wrote:
Whenever you do a LIKE you need to check your indexes in your DB to tune the query to be fast.
Thanks -Vincent
On 18 Sep 2014 at 11:00:36, Thomas Mortagne ([email protected](mailto:[email protected])) wrote:
It's a new implementation with a lot of caching but the model did not changed.
On Thu, Sep 18, 2014 at 10:47 AM, Paul Libbrecht wrote:
Dear XWiki developers,
again and again I see code in our Curriki (quite some of which has been written by XWiki experts) that employ LIKE hql queries to evaluate if an XWikiRights object applied to a give group or user.
I has happened often that some such queries kill our production application server; in the meantime we've managed to remove them. However, there are many more and it really appears inefficient to me.
Is the "new xwiki rights model" that has been talked about here and there an enhancement in this respect? (it is in XWiki 6 or so if I remember well, we are still at 3.5). Simply splitting the addresses of the xwikirights object in the DB could leverage effectively an index which these LIKE queries fail to do.
thanks in advance.
Paul
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Caleb, Thomas, this is not about group members, these are separate objects, hence are queried as separate HQL and SQL variables. What I see is queries for such a purpose as "all documents with x/y/z which user A or members of group P,Q,R is allowed see" For these, the normal way, apparently, has been to do a LIKE queries checking for a substring (the user-name or group-name) in the group or member property of the XWikiRights object. Are you telling me that there's a better way to do that? (e.g. that there would be different object for each member or group in the stored XWikiRights?) paul On 18 sept. 2014, at 11:16, Caleb James DeLisle <[email protected]> wrote:
Didn't we stop storing members of a group that way a long time ago? (implying the LIKE queries are strictly for backward compat)
On 18 sept. 2014, at 11:19, Thomas Mortagne <[email protected]> wrote:
We stopped storing it but it's still supported (we don't log warning or stuff like that when something is still doing it) which mean some extension might be doing it and of course existing rights might contain it. The question is do we want to stop the support and automatically migrate existing stuff (and maybe break some existing extensions).
On Thu, Sep 18, 2014 at 11:33 AM, Paul Libbrecht <[email protected]> wrote:
Caleb, Thomas,
this is not about group members, these are separate objects, hence are queried as separate HQL and SQL variables.
What I see is queries for such a purpose as "all documents with x/y/z which user A or members of group P,Q,R is allowed see" For these, the normal way, apparently, has been to do a LIKE queries checking for a substring (the user-name or group-name) in the group or member property of the XWikiRights object.
Are you telling me that there's a better way to do that? (e.g. that there would be different object for each member or group in the stored XWikiRights?)
The right manager UI is storing only one user or group in each XWikiRights object AFAIK (since quite some time actually, pretty much since that UI exist I think).
paul
On 18 sept. 2014, at 11:16, Caleb James DeLisle <[email protected]> wrote:
Didn't we stop storing members of a group that way a long time ago? (implying the LIKE queries are strictly for backward compat)
On 18 sept. 2014, at 11:19, Thomas Mortagne <[email protected]> wrote:
We stopped storing it but it's still supported (we don't log warning or stuff like that when something is still doing it) which mean some extension might be doing it and of course existing rights might contain it. The question is do we want to stop the support and automatically migrate existing stuff (and maybe break some existing extensions).
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (4)
-
Caleb James DeLisle -
Paul Libbrecht -
Thomas Mortagne -
vincent@massol.net