[
https://issues.apache.org/jira/browse/CASSANDRA-14541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16734802#comment-16734802
]
mck commented on CASSANDRA-14541:
---------------------------------
[~avi.kivity], i'm taking on a review of this. as i'm new to this code so could
you help me out with the following…
The order of `tracing, custom-payload, warnings` is easily confirmed by looking
at
[Message.java|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/transport/Message.java#L317-L319]
But where is the "padding" happening in the code?
Regarding the formatting of the text, it seems a little odd for the spec
document. i don't see such style anywhere else. Also what you're adding is not
only about the flags in the specification, but about the order of contents in
the *body*. That is it is dealing with a broader context than that of 'Section
2. Frame Header'.
To meet the existing format layout/style and correct context, I'm wondering if
it would make more sense to rewrite the patch into something along the lines of
{noformat}
4. Messages
Dependant on the flags specified in the header, the overall body of the message
must be:
[<tracing_id>][<warnings>][<custom_payload>]<opcode_message>[<padding>]
where:
- <tracing_id> is a UUID tracing ID (if this is a request message, and if
the Tracing flag is set).
- <warnings> is a string list of warnings (if this is a request message, if
the Warning flag is set).
- <custom_payload> is bytes map for the serialised custom payload (if the
Custom payload flag is set)
- <opcode_message> as defined below through sections 4 and 5.
- <padding> possibly empty padding to fill out the body to the message
length as specified in the header. ???is this accurate?
4.1. Requests
{noformat}
On a separate note, while we're tackling this, the sentence "The rest of the
body will then be the usual body corresponding to the response opcode." could
be removed. It doesn't make sense in the middle of the flags section.
> Order of warning and custom payloads is unspecified in the protocol
> specification
> ---------------------------------------------------------------------------------
>
> Key: CASSANDRA-14541
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14541
> Project: Cassandra
> Issue Type: Bug
> Components: Legacy/Documentation and Website
> Reporter: Avi Kivity
> Assignee: Avi Kivity
> Priority: Trivial
> Fix For: 3.11.x, 4.x
>
> Attachments:
> v1-0001-Document-order-of-tracing-warning-and-custom-payl.patch
>
>
> Section 2.2 of the protocol specification documents the types of tracing,
> warning, and custom payloads, but does not document their order in the body.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]