From ac51c417ea652efd0056f08aedce5998e4518d75 Mon Sep 17 00:00:00 2001 From: sylwiaszunejko Date: Tue, 21 Nov 2023 20:25:27 +0100 Subject: [PATCH] docs: add documentation about sending tablet info to protocol extensions --- docs/dev/protocol-extensions.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/dev/protocol-extensions.md b/docs/dev/protocol-extensions.md index 74a379333e..60feae653f 100644 --- a/docs/dev/protocol-extensions.md +++ b/docs/dev/protocol-extensions.md @@ -180,3 +180,22 @@ The string map in the SUPPORTED response will contain the following parameters: - `ERROR_CODE`: a 32-bit signed decimal integer which Scylla will use as the error code for the rate limit exception. + +## Sending tablet info to the drivers + +This extension adds support for sending tablet info to the drivers if the +request was routed to the wrong node/shard. + +There is a need for sending tablet info to the drivers so they can be +tablet aware. +For the best performance we want to get this info lazily only when it is +needed. + +The info is send when driver asks about the information that the specific +tablet contains and it is directed to the wrong node/shard so it could +use that information for every subsequent query. +If we send the query to the wrong node/shard, we want to send the RESULT +message with additional information about the tablet in `custom_payload`: + + - `tablet_replicas` - information about tablet replicas, for every replica there is information about the host and shard. + - `token_range` - information about token range for that tablet in format `(first_token, last_token]`.