RUST-2354 Add option for max length when parsing cstrings#643
Open
isabelatkinson wants to merge 3 commits intomongodb:mainfrom
Open
RUST-2354 Add option for max length when parsing cstrings#643isabelatkinson wants to merge 3 commits intomongodb:mainfrom
isabelatkinson wants to merge 3 commits intomongodb:mainfrom
Conversation
jyemin
requested changes
Feb 19, 2026
kevinAlbs
reviewed
Feb 20, 2026
Collaborator
kevinAlbs
left a comment
There was a problem hiding this comment.
Looks good with a suggestion to validate regex.
abr-egn
approved these changes
Feb 23, 2026
| /// encountered that exceeds the provided `len`. | ||
| #[cfg(feature = "sfp-internal")] | ||
| #[doc(hidden)] | ||
| pub fn get_with_max_cstr_parse_len( |
Contributor
There was a problem hiding this comment.
(not needed for this PR since this is an internal API we can change if needed)
If we end up wanting to add any more control over parsing we might want to change this to get_with_options and make a proper options struct.
kevinAlbs
approved these changes
Feb 23, 2026
Contributor
|
Going to give this a quick try in monguard tomorrow to confirm we're not missing any requirements, but the interface LGTM after a quick look. |
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.
The maximum length can be configured on an iterator or through new getter methods:
The API additions are exposed behind an
sfp-internalfeature flag. The documentation for them is hidden. This will give us more semver flexibility to make breaking changes if needed. Docs for the new features can be generated locally by running: