Clarify order of non-message frame body elements in protocol spec

Patch and review by Mick Semb Wever and Sam Tunnicliffe for CASSANDRA-14541
This commit is contained in:
Sam Tunnicliffe 2021-01-19 09:46:52 +00:00
parent 92182bcc23
commit 732ec77238
1 changed files with 14 additions and 3 deletions

View File

@ -120,15 +120,17 @@ Table of Contents
information.
If a response frame has the tracing flag set, its body contains
a tracing ID. The tracing ID is a [uuid] and is the first thing in
the frame body. The rest of the body will then be the usual body
corresponding to the response opcode.
the frame body.
0x04: Custom payload flag. For a request or response frame, this indicates
that a generic key-value custom payload for a custom QueryHandler
implementation is present in the frame. Such a custom payload is simply
ignored by the default QueryHandler implementation.
Currently, only QUERY, PREPARE, EXECUTE and BATCH requests support
payload.
Type of custom payload is [bytes map] (see below).
Type of custom payload is [bytes map] (see below). If either or both
of the tracing and warning flags are set, the custom payload will follow
those indicated elements in the frame body. If neither are set, the custom
payload will be the first value in the frame body.
0x08: Warning flag. The response contains warnings which were generated by the
server to go along with this response.
If a response frame has the warning flag set, its body will contain the
@ -249,6 +251,15 @@ Table of Contents
4. Messages
Dependant on the flags specified in the header, the layout of the message body must be:
[<tracing_id>][<warnings>][<custom_payload>]<message>
where:
- <tracing_id> is a UUID tracing ID, present if this is a request message and the Tracing flag is set.
- <warnings> is a string list of warnings (if this is a request message and the Warning flag is set.
- <custom_payload> is bytes map for the serialised custom payload present if this is one of the message types
which support custom payloads (QUERY, PREPARE, EXECUTE and BATCH) and the Custom payload flag is set.
- <message> as defined below through sections 4 and 5.
4.1. Requests
Note that outside of their normal responses (described below), all requests