@@ -154,7 +154,7 @@ impl PartitionClient {
154
154
155
155
let partition = maybe_retry ( & self . backoff_config , self , "fetch_records" , || async move {
156
156
let response = self . get ( ) . await ?. request ( & request) . await ?;
157
- process_fetch_response ( self . partition , & self . topic , response)
157
+ process_fetch_response ( self . partition , & self . topic , response, offset )
158
158
} )
159
159
. await ?;
160
160
@@ -546,6 +546,7 @@ fn process_fetch_response(
546
546
partition : i32 ,
547
547
topic : & str ,
548
548
response : FetchResponse ,
549
+ request_offset : i64 ,
549
550
) -> Result < FetchResponsePartition > {
550
551
let response_topic = response
551
552
. responses
@@ -575,7 +576,11 @@ fn process_fetch_response(
575
576
return Err ( Error :: ServerError {
576
577
protocol_error : err,
577
578
error_message : None ,
578
- request : RequestContext :: Partition ( topic. to_owned ( ) , partition) ,
579
+ request : RequestContext :: Fetch {
580
+ topic_name : topic. to_owned ( ) ,
581
+ partition_id : partition,
582
+ offset : request_offset,
583
+ } ,
579
584
response : Some ( ServerErrorResponse :: PartitionFetchState {
580
585
high_watermark : response_partition. high_watermark . 0 ,
581
586
last_stable_offset : response_partition. last_stable_offset . map ( |x| x. 0 ) ,
0 commit comments