fix(vlv): include contextID in subsequent VLV requests - #618
Merged
Merged
Conversation
The VLV request control did not encode the optional contextID field, even when it was present on the request control object. The LDAP server uses the contextID returned in a VLV response to continue an existing virtual list search. Omitting it causes each subsequent request to be treated as a new VLV search, preventing state reuse and leading to significantly increased processing time and memory usage on the LDAP server. Encode contextID whenever it is available to allow servers to resume an existing VLV search context as intended by RFC 3876. Co-Authored-By: Felix Botner <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We wondered about the performance and usage of the whole memory when using the VLV control in a request:
A environment with 200.000 users and 8 GB RAM:
normal LDAP search: 6.125s
SSS+VLVwithPAGE_SIZE=50: aborted after 3-4 minutes, RAM completely fullSSS+VLVwithPAGE_SIZE=2000: 1m36.634s (slapd Mem 65.7 %)SimplePagedResultsControl
PAGE_SIZE=50: 10.394sSimplePagedResultsControl
PAGE_SIZE=2000: 6.248sThe VLV request control did not encode the optional
contextIDfield, even when it was present on the request control object.The LDAP server uses the
contextIDreturned in a VLV response to continue an existing virtual list search. Omitting it causes each subsequent request to be treated as a new VLV search, preventing state reuse and leading to significantly increased processing time and memory usage on the LDAP server.Encode
contextIDwhenever it is available to allow servers to resume an existing VLV search context as intended by RFC 3876.