From 13d8842430d7b34acfe1d739e3c26d89a8965097 Mon Sep 17 00:00:00 2001 From: Lucas Kent Date: Tue, 26 Nov 2024 12:52:35 +1100 Subject: [PATCH] KafkaSinkCluster: Error on AlterReplicaLogDirs (#1837) --- shotover/src/transforms/kafka/sink_cluster/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shotover/src/transforms/kafka/sink_cluster/mod.rs b/shotover/src/transforms/kafka/sink_cluster/mod.rs index a717e49a5..c2c9e0748 100644 --- a/shotover/src/transforms/kafka/sink_cluster/mod.rs +++ b/shotover/src/transforms/kafka/sink_cluster/mod.rs @@ -1128,6 +1128,18 @@ Shotover cannot handle this request as it is not appropriate for shotover to shu The connection to the client has been closed." )); } + Some(Frame::Kafka(KafkaFrame::Request { + body: RequestBody::AlterReplicaLogDirs(_), + .. + })) => { + return Err(anyhow!( + "Client sent AlterReplicaLogDirs request. +Shotover has not implemented support for this message type. +It could theoretically be supported by performing the inverse of DescribeLogDirs. +i.e. Define a custom path format like `actual-kafka-broker-id3:/original/log/dir/path` and then parse the broker id and send the original path to that broker. +But it is expected that if you are using shotover as a proxy you do not care about the internal state of the kafka cluster enough to use AlterReplicaLogDirs." + )); + } Some(Frame::Kafka(KafkaFrame::Request { body: RequestBody::UnregisterBroker(_), ..