aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornadya73 <nadya73@yandex-team.com>2025-02-12 11:27:46 +0300
committernadya73 <nadya73@yandex-team.com>2025-02-12 11:45:59 +0300
commit9d19db64b375cb90302533cd3f7b14bf96e04802 (patch)
tree2aac7a918d32ff8596145525a25d46800907b8e3
parentfdebd34b580c0027c5fd658f8591736840f41ad5 (diff)
downloadydb-9d19db64b375cb90302533cd3f7b14bf96e04802.tar.gz
[kafka] YT-24188: Support SaslHandshake request v1
* Changelog entry Type: feature Component: kafka-proxy Support SaslHandshake v1 request commit_hash:0766f39179fbb50b35458c54917bbcec1f4924c3
-rw-r--r--yt/yt/client/kafka/requests.cpp4
-rw-r--r--yt/yt/client/kafka/requests.h8
2 files changed, 11 insertions, 1 deletions
diff --git a/yt/yt/client/kafka/requests.cpp b/yt/yt/client/kafka/requests.cpp
index e5ac8928f8..f81e97040d 100644
--- a/yt/yt/client/kafka/requests.cpp
+++ b/yt/yt/client/kafka/requests.cpp
@@ -601,8 +601,10 @@ void TRspFetch::Serialize(IKafkaProtocolWriter* writer, int apiVersion) const
////////////////////////////////////////////////////////////////////////////////
-void TReqSaslHandshake::Deserialize(IKafkaProtocolReader* reader, int /*apiVersion*/)
+void TReqSaslHandshake::Deserialize(IKafkaProtocolReader* reader, int apiVersion)
{
+ ApiVersion = apiVersion;
+
Mechanism = reader->ReadString();
}
diff --git a/yt/yt/client/kafka/requests.h b/yt/yt/client/kafka/requests.h
index e8c4342354..04435ffcaf 100644
--- a/yt/yt/client/kafka/requests.h
+++ b/yt/yt/client/kafka/requests.h
@@ -120,6 +120,13 @@ struct TRecord
////////////////////////////////////////////////////////////////////////////////
+struct TReqBase
+{
+ int ApiVersion = 0;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+
struct TReqApiVersions
{
static constexpr ERequestType RequestType = ERequestType::ApiVersions;
@@ -504,6 +511,7 @@ struct TRspFetch
////////////////////////////////////////////////////////////////////////////////
struct TReqSaslHandshake
+ : public TReqBase
{
static constexpr ERequestType RequestType = ERequestType::SaslHandshake;