You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Boyang Chen (Jira)" <ji...@apache.org> on 2020/06/03 03:29:00 UTC

[jira] [Updated] (KAFKA-10087) Properly throw LogTruncation exception from OffsetForLeaderEpoch future

     [ https://issues.apache.org/jira/browse/KAFKA-10087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boyang Chen updated KAFKA-10087:
--------------------------------
    Description: 
For OffsetForLeaderEpoch#onSuccess, we could throw either OffsetOutOfRange or LogTruncation exceptions, which are swallowed by the AsyncClient logic:



 
{code:java}
try { 
    future.complete(handleResponse(node, requestData, resp)); 
} catch (RuntimeException e) {
  if (!future.isDone()) { 
      future.raise(e); 
   }
}
{code}

 We should fix the exception case to throw it to the upstream. In the meantime, we should ensure that any discard exception case gets retried eventually for LeaderOffset call.

 

  was:
For OffsetForLeaderEpoch#onSuccess, we could throw either OffsetOutOfRange or LogTruncation exceptions, which are swallowed by the AsyncClient logic:
try {
    future.complete(handleResponse(node, requestData, resp));
} catch (RuntimeException e) {
    if (!future.isDone()) {
        future.raise(e);
    }
}
We should fix the exception case to throw it to the upstream. In the meantime, we should ensure that any discard exception case gets retried eventually for LeaderOffset call.


> Properly throw LogTruncation exception from OffsetForLeaderEpoch future
> -----------------------------------------------------------------------
>
>                 Key: KAFKA-10087
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10087
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Boyang Chen
>            Assignee: Boyang Chen
>            Priority: Major
>
> For OffsetForLeaderEpoch#onSuccess, we could throw either OffsetOutOfRange or LogTruncation exceptions, which are swallowed by the AsyncClient logic:
>  
> {code:java}
> try { 
>     future.complete(handleResponse(node, requestData, resp)); 
> } catch (RuntimeException e) {
>   if (!future.isDone()) { 
>       future.raise(e); 
>    }
> }
> {code}
>  We should fix the exception case to throw it to the upstream. In the meantime, we should ensure that any discard exception case gets retried eventually for LeaderOffset call.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)