@@ -793,8 +793,9 @@ protected void handleFetchRequest(KafkaHeaderAndRequest fetch,
793
793
.whenComplete ((result , error ) -> {
794
794
// TODO: report errors for specific partitions and continue for non failed lookups
795
795
if (error != null ) {
796
+ log .error ("Cannot lookup brokers for a fetch request error {}" , error );
796
797
FetchResponse fetchResponse = buildFetchErrorResponse (fetchRequest ,
797
- fetchData , Errors .UNKNOWN_SERVER_ERROR );
798
+ fetchData , Errors .FETCH_SESSION_ID_NOT_FOUND );
798
799
resultFuture .complete (fetchResponse );
799
800
} else {
800
801
boolean multipleBrokers = false ;
@@ -822,7 +823,7 @@ protected void handleFetchRequest(KafkaHeaderAndRequest fetch,
822
823
}).exceptionally (badError -> {
823
824
log .error ("bad error for FULL fetch" , badError );
824
825
FetchResponse fetchResponse = buildFetchErrorResponse (fetchRequest ,
825
- fetchData , Errors .UNKNOWN_SERVER_ERROR );
826
+ fetchData , Errors .FETCH_SESSION_TOPIC_ID_ERROR );
826
827
resultFuture .complete (fetchResponse );
827
828
return null ;
828
829
});
@@ -842,8 +843,10 @@ protected void handleFetchRequest(KafkaHeaderAndRequest fetch,
842
843
// add the topicPartition with timeout error if it's not existed in responseMap
843
844
fetchData .keySet ().forEach (topicPartition -> {
844
845
if (!responseMap .containsKey (topicPartition )) {
846
+ log .error (metadataNamespace + " Request {}: not found response for {}" ,
847
+ fetch .getHeader (), topicPartition );
845
848
responseMap .put (topicPartition ,
846
- getFetchPartitionDataWithError (Errors .UNKNOWN_SERVER_ERROR ));
849
+ getFetchPartitionDataWithError (Errors .FETCH_SESSION_TOPIC_ID_ERROR ));
847
850
}
848
851
});
849
852
if (log .isDebugEnabled ()) {
@@ -961,7 +964,7 @@ protected void handleFetchRequest(KafkaHeaderAndRequest fetch,
961
964
log .error ("bad error while fetching for {} from {}" ,
962
965
fetchData .keySet (), badError , kopBroker );
963
966
fetchData .keySet ().forEach (topicPartition ->
964
- errorsConsumer .accept (topicPartition , Errors .UNKNOWN_SERVER_ERROR )
967
+ errorsConsumer .accept (topicPartition , Errors .FETCH_SESSION_TOPIC_ID_ERROR )
965
968
);
966
969
return null ;
967
970
}).whenComplete ((ignore1 , ignore2 ) -> {
@@ -1595,6 +1598,7 @@ protected void handleDeleteRecords(KafkaHeaderAndRequest deleteRecords,
1595
1598
.whenComplete ((result , error ) -> {
1596
1599
// TODO: report errors for specific partitions and continue for non failed lookups
1597
1600
if (error != null ) {
1601
+ log .error ("delete records error {}" , error );
1598
1602
Map <TopicPartition , Errors > errorsMap =
1599
1603
partitionOffsets
1600
1604
.keySet ()
0 commit comments