ryerraguntla commented on code in PR #4400:
URL: https://github.com/apache/iggy/pull/4400#discussion_r4205804373
##########
gateways/kafka/src/protocol/bounds_guard.rs:
##########
@@ -703,6 +703,44 @@ pub fn validate_create_topics_shape(
Ok(())
}
+/// Mirrors the field order `DeleteTopicsRequest::decode` walks, for the
`topic_names`-based
+/// shape (v1-v5) only.
+///
+/// This bridge's `RANGE` never advertises v6, the `topics:
Vec<DeleteTopicState>`
+/// (topic-id-based) shape, so that branch is never reached and isn't walked
here.
+///
+/// # Errors
+///
+/// Returns an error when a declared array/string/bytes length cannot fit in
the bytes remaining
+/// in the frame, or the body is truncated or malformed in a way that cannot
be walked.
+pub fn validate_delete_topics_shape(
+ version: i16,
+ body: &Bytes,
+ max_frame_size: usize,
+) -> Result<()> {
+ let mut c = ShapeCursor::new(body.clone(), max_frame_size);
+ let flexible = version >= 4;
Review Comment:
fixed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]