You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/07/05 10:53:01 UTC

[jira] [Commented] (KAFKA-5556) KafkaConsumer.commitSync throws IllegalStateException: Attempt to retrieve exception from future which hasn't failed

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

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

GitHub user umesh9794 opened a pull request:

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

    KAFKA-5556 : KafkaConsumer.commitSync throws IllegalStateException: A…

    This PR makes `commitOffsetsSync` method check whether future is completed after client's poll or not. 
    
    Tests: All existing tests especially "`testCommitOffsetSyncCallbackWithNonRetriableException`" is passed. Not sure if we need to add any dedicated tests for this minor change. 
    
    Awaiting your review comments. 

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

    $ git pull https://github.com/umesh9794/kafka KAFKA-5556

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

    https://github.com/apache/kafka/pull/3489.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 #3489
    
----
commit 1d44ca726026aea7bb030d5eecb5d4a197b5b0b9
Author: umesh chaudhary <um...@gmail.com>
Date:   2017-07-05T10:45:59Z

    KAFKA-5556 : KafkaConsumer.commitSync throws IllegalStateException: Attempt to retrieve exception from future which hasn't failed

----


> KafkaConsumer.commitSync throws IllegalStateException: Attempt to retrieve exception from future which hasn't failed
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5556
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5556
>             Project: Kafka
>          Issue Type: Bug
>          Components: clients
>    Affects Versions: 0.10.2.1, 0.11.0.0
>            Reporter: Damian Guy
>            Assignee: Umesh Chaudhary
>            Priority: Critical
>             Fix For: 0.10.2.2, 0.11.0.1
>
>
> From the user list:
> I have been running a streaming application on some data set. Things
> usually run ok. Today I was trying to run the same application on Kafka
> (ver 0.10.2.1 on Scala 2.12) installed in a Mesos DC/OS cluster. After
> running for quite some time, I got the following exception ..
> {code}
> Exception in thread "StreamThread-1" java.lang.IllegalStateException:
> > Attempt to retrieve exception from future which hasn't failed
> > at
> > org.apache.kafka.clients.consumer.internals.RequestFuture.exception(RequestFuture.java:99)
> > at
> > org.apache.kafka.clients.consumer.internals.RequestFuture.isRetriable(RequestFuture.java:89)
> > at
> > org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.commitOffsetsSync(ConsumerCoordinator.java:590)
> > at
> > org.apache.kafka.clients.consumer.KafkaConsumer.commitSync(KafkaConsumer.java:1124)
> > at
> > org.apache.kafka.streams.processor.internals.StreamTask.commitOffsets(StreamTask.java:296)
> > at
> > org.apache.kafka.streams.processor.internals.StreamTask$1.run(StreamTask.java:79)
> > at
> > org.apache.kafka.streams.processor.internals.StreamsMetricsImpl.measureLatencyNs(StreamsMetricsImpl.java:188)
> > at
> > org.apache.kafka.streams.processor.internals.StreamTask.commit(StreamTask.java:280)
> > at
> > org.apache.kafka.streams.processor.internals.StreamThread.commitOne(StreamThread.java:807)
> > at
> > org.apache.kafka.streams.processor.internals.StreamThread.commitAll(StreamThread.java:794)
> > at
> > org.apache.kafka.streams.processor.internals.StreamThread.maybeCommit(StreamThread.java:769)
> > at
> > org.apache.kafka.streams.processor.internals.StreamThread.runLoop(StreamThread.java:647)
> > at
> > org.apache.kafka.streams.processor.internals.StreamThread.run(StreamThread.java:361)
> {code}
> Looks like we should check if the future is done, i.e., check the return value from poll and retry if time is remaining and {{!future.isDone()}}



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