[ 
https://issues.apache.org/jira/browse/KAFKA-5835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16196462#comment-16196462
 ] 

ASF GitHub Bot commented on KAFKA-5835:
---------------------------------------

GitHub user rekhajoshm opened a pull request:

    https://github.com/apache/kafka/pull/4042

    [KAFKA-5835][CLIENTS] CommitFailedException exception versus KafkaConsumer 
flow

    The invalid offset/out of range offset is captured in 
IllegalArgumentException/RunTimeException.
    The CommitFailedException only happens as called out in 
CommitFailedException javadoc.
    Hence made that exception flow explicit, and updated KafkaConsumer javadoc.
    
    Please let me know if it makes sense.Thanks

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rekhajoshm/kafka KAFKA-5835

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/4042.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #4042
    
----
commit c15beda320475e0b243ac444ab262c93012e44ba
Author: rekhajoshm <rekhajo...@gmail.com>
Date:   2017-10-09T03:16:19Z

    [KAFKA-5835][CLIENTS] CommitFailedException exception versus KafkaConsumer 
flow

----


> CommitFailedException message is misleading and cause is swallowed
> ------------------------------------------------------------------
>
>                 Key: KAFKA-5835
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5835
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.11.0.0
>            Reporter: Stevo Slavic
>            Priority: Trivial
>
> {{CommitFailedException}}'s message suggests that it can only be thrown as 
> consequence of rebalancing. JavaDoc of the {{CommitFailedException}} suggests 
> differently that in general it can be thrown for any kind of unrecoverable 
> failure from {{KafkaConsumer#commitSync()}} call (e.g. if offset being 
> committed is invalid / outside of range).
> {{CommitFailedException}}'s message is misleading in a way that one can just 
> see the message in logs, and without consulting JavaDoc or source code one 
> can assume that message is correct and that rebalancing is the only potential 
> cause, so one can wast time proceeding with the debugging in wrong direction.
> Additionally, since {{CommitFailedException}} can be thrown for different 
> reasons, cause should not be swallowed. This makes impossible to handle each 
> potential cause in a specific way. If the cause is another exception please 
> pass it as cause, or construct appropriate exception hierarchy with specific 
> exception for every failure cause and make {{CommitFailedException}} abstract.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to