-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFE: improve the performance of evaluation of filter component when tested against a large valueset (like group members) #6172
Labels
performance
Issue impacts performance
priority_high
need urgent fix / highly valuable / easy to fix
work in progress
Work in Progress - can be reviewed, but not ready for merge.
Milestone
Comments
tbordaz
added a commit
to tbordaz/389-ds-base
that referenced
this issue
May 15, 2024
…ponent when tested against a large valueset (like group members) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of large number of value and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but not used in SRCH path. Fix description: if config param 'nsslapd-filter-match-use-sorted-vs = on' then it uses slapi_valueset_find (that tries to use sorted valueset) rather than plugin_call_syntax_filter_ava. In both case sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. Likely this optimization should be dropped for extended search relates: 389ds#6172 Reviewed by:
tbordaz
added a commit
to tbordaz/389-ds-base
that referenced
this issue
May 15, 2024
…ponent when tested against a large valueset (like group members) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: 389ds#6172 Reviewed by: Pierre Rogier (Big Thanks !!!)
tbordaz
added a commit
to tbordaz/389-ds-base
that referenced
this issue
May 17, 2024
…ponent when tested against a large valueset (like group members) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: 389ds#6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
to tbordaz/389-ds-base
that referenced
this issue
May 17, 2024
…ponent when tested against a large valueset (like group members) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: 389ds#6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 22, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
884deb6..904dc99 main |
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
tbordaz
added a commit
that referenced
this issue
May 27, 2024
…ponent when tested against a large valueset (like group members) (#6173) Bug description: Before returning an entry (to a SRCH) the server checks that the entry matches the SRCH filter. If a filter component (equality) is testing the value (ava) against a large valueset (like uniquemember values), it takes a long time because of the large number of values and required normalization of the values. This can be improved taking benefit of sorted valueset. Those sorted valueset were created to improve updates of large valueset (groups) but at that time not implemented in SRCH path. Fix description: In case of LDAP_FILTER_EQUALITY component, the server can get benefit of the sorted valuearray. To limit the risk of regression, we use the sorted valuearray only for the DN syntax attribute. Indeed the sorted valuearray was designed for those type of attribute. With those two limitations, there is no need of a toggle and the call to plugin_call_syntax_filter_ava can be replaced by a call to slapi_valueset_find. In both cases, sorted valueset and plugin_call_syntax_filter_ava, ava and values are normalized. In sorted valueset, the values have been normalized to insert the index in the sorted array and then comparison is done on normalized values. In plugin_call_syntax_filter_ava, all values in valuearray (of valueset) are normalized before comparison. relates: #6172 Reviewed by: Pierre Rogier, Simon Pichugin (Big Thanks !!!)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
performance
Issue impacts performance
priority_high
need urgent fix / highly valuable / easy to fix
work in progress
Work in Progress - can be reviewed, but not ready for merge.
Is your feature request related to a problem? Please describe.
Before returning an entry (to a SRCH) the server check that the SRCH filter matches the entry. If a component of the filter is testing a large valueset in the candidate entry, it is expensive to check the matching.
A typical issue is with a component like '(uniquemember=foo)' and the candidate entry is a group containing thousands of 'uniquemember'.
Steps to reproduce the behavior:
Once primed the second search should be much faster
Describe the solution you'd like
Proposed an option to use the sorted valueset when checking the match (ava test)
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
I initially thought that the performance issue was related to a filter bypass (on indexed searches) #6030 but I doubt that the bypass is always possible. So I prefer to make the test of the match faster.
The text was updated successfully, but these errors were encountered: