Rework open mode parsing in TNetXNGFile #22778
Open
vepadulano wants to merge 1 commit into
Open
Conversation
9f84025 to
551d8bf
Compare
Test Results 23 files 23 suites 3d 16h 30m 28s ⏱️ Results for commit 551d8bf. |
jblomer
reviewed
Jul 9, 2026
jblomer
left a comment
Contributor
There was a problem hiding this comment.
Would it be simpler/better to use Split in ParseOpenMode, iterate through the tokens and stop when a known token was found?
Member
Author
I don't really know, I don't have a strong opinion about this. I feel like |
551d8bf to
17f9d45
Compare
Member
Author
|
@jblomer I have implemented the suggested change, let me know what you think. |
The parsing of the opening mode string option to create the corresponding XRootD opening mode flag assumes the string option is a single word. Given that the input open mode string may not contain just one word, e.g. because of the internal extra option `_WITHOUT_GLOBALREGISTRATION`, rework the parsing logic by * Tokenizing the input open mode string. * Returning early in case a token corresponds to one of the accepted words. * In all other cases, return success (0) or failure (-1) depending on whether the `assumeRead` parameter is true or false.
17f9d45 to
db80d7d
Compare
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 parsing of the opening mode string option to create the corresponding XRootD
opening mode flag assumes the string option is a single word. Given that the input
open mode string may not contain just one word, e.g. because of the internal
extra option
_WITHOUT_GLOBALREGISTRATION, rework the parsing logic bythe
assumeReadparameter is true or false.Found while testing #20272 on EOS