Skip to content
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

clarify that the order of CAP REQ parameters is not significant #549

Closed
wants to merge 2 commits into from

Conversation

slingamn
Copy link
Contributor

@slingamn slingamn commented Aug 4, 2024

As per discussion here: #543 (comment)

my understanding is that this is not currently specified, but that it's not a behavior change for any actually existing servers, and there's no use case for having order matter within the same line (if the client cares about ordering or dependencies, it should use multiple lines, or rely on the CAP LS output).

@progval
Copy link
Contributor

progval commented Aug 4, 2024

might be worth adding an errata ("Previous versions of this specification did not say order of capabilities in CAP REQ is not meaningful")

@emersion
Copy link
Contributor

emersion commented Aug 4, 2024

Seems to contradict with this bit of the spec:

The list of capabilities MUST be parsed and processed from left to right

@emersion emersion mentioned this pull request Aug 4, 2024
@slingamn
Copy link
Contributor Author

slingamn commented Aug 4, 2024

Thanks, good point. This was added in 1e7df88. Does anyone know what the intent was?

@slingamn
Copy link
Contributor Author

slingamn commented Aug 4, 2024

55df8fd changed "parsed from left to right" to "parsed and processed from left to right". This came out of review activity on #327. Chronologically it might relate to this comment: #327 (comment)

My sense right now is that specifying left-to-right parsing is reasonable because it provides an unambiguous semantics for duplicated CAP values, but the semantic result of the parsing should be an unordered mapping.

@jwheare
Copy link
Member

jwheare commented Aug 4, 2024

Yeah I think this change is incorrect. We should keep the existing left to right significance.

@slingamn
Copy link
Contributor Author

slingamn commented Aug 4, 2024

I think the underlying question here is actually "is there a use case for atomic, simultaneous updates of capabilities via CAP REQ"? If the answer is yes, then that would be a reason to adopt the syntax/semantics split I described earlier, where parsing is left-to-right but the result of the parsing is an unordered mapping that gets applied atomically. If the answer is no, then the current behavior is fine and CAP REQ :baz bat (at least when successful) is synonymous with CAP REQ baz followed by CAP REQ bat.

But also this is basically moot if #543 switches away from an edge-triggered design where CAP REQ itself triggers a side effect, and instead relies on an explicit command to trigger the burst. So there's no need to get into that question now.

@slingamn slingamn closed this Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants