Skip to content

Commit

Permalink
k/fetch_request: fixed iterating over partition responses
Browse files Browse the repository at this point in the history
The fetch_response iterator wrapper created by operation context was
incorrectly incrementing only the partition_response iterator. This
caused it to access out of range elements when multiple topics were
present in the request.

Fixes: #180

Signed-off-by: Michal Maslanka <[email protected]>
  • Loading branch information
mmaslankaprv committed Nov 26, 2020
1 parent cd7b7fa commit 0b12ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/kafka/requests/fetch_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ void op_context::response_iterator::set(
}

op_context::response_iterator& op_context::response_iterator::operator++() {
_it->partition_response++;
_it++;
return *this;
}

Expand Down

0 comments on commit 0b12ddf

Please sign in to comment.