You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sa...@apache.org on 2021/01/22 14:46:08 UTC

[cassandra] branch cassandra-2.2 updated: Clarify order of non-message frame body elements in protocol spec

This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
     new 732ec77  Clarify order of non-message frame body elements in protocol spec
732ec77 is described below

commit 732ec7723856fdab43e6e4dd297c1335c818686c
Author: Sam Tunnicliffe <sa...@beobal.com>
AuthorDate: Tue Jan 19 09:46:52 2021 +0000

    Clarify order of non-message frame body elements in protocol spec
    
    Patch and review by Mick Semb Wever and Sam Tunnicliffe for CASSANDRA-14541
---
 doc/native_protocol_v4.spec | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/doc/native_protocol_v4.spec b/doc/native_protocol_v4.spec
index 187ff80..07ddea5 100644
--- a/doc/native_protocol_v4.spec
+++ b/doc/native_protocol_v4.spec
@@ -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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org