Skip to content

Commit

Permalink
review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Oct 28, 2024
1 parent ae64cfc commit 06bcc3d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions shotover/src/transforms/kafka/sink_cluster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,12 +904,6 @@ impl KafkaSinkCluster {
let group_id = offset_fetch.group_id.clone();
self.route_to_group_coordinator(message, group_id);
} else {
// This is possibly dangerous.
// The client could construct a message which is valid for a specific shotover node, but not for any single kafka broker.
// We may need to add some logic to split the request into multiple messages going to different destinations,
// and then reconstruct the response back into a single response
//
// For now just pick the first group as that is sufficient for the simple cases.
self.split_and_route_request::<OffsetFetchSplitAndRouter>(message)?;
};
}
Expand Down Expand Up @@ -1384,7 +1378,7 @@ impl KafkaSinkCluster {
}

/// This method removes all group ids from the DeleteGroups request and returns them split up by their destination.
/// If any topics are unroutable they will have their BrokerId set to -1
/// If any groups ids are unroutable they will have their BrokerId set to -1
fn split_delete_groups_request_by_destination(
&mut self,
body: &mut DeleteGroupsRequest,
Expand All @@ -1406,8 +1400,8 @@ impl KafkaSinkCluster {
result
}

/// This method removes all group ids from the DeleteGroups request and returns them split up by their destination.
/// If any topics are unroutable they will have their BrokerId set to -1
/// This method removes all groups from the OffsetFetch request and returns them split up by their destination.
/// If any groups are unroutable they will have their BrokerId set to -1
fn split_offset_fetch_request_by_destination(
&mut self,
body: &mut OffsetFetchRequest,
Expand Down

0 comments on commit 06bcc3d

Please sign in to comment.