You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Bharat Viswanadham (JIRA)" <ji...@apache.org> on 2016/06/14 22:15:30 UTC

[jira] [Commented] (KAFKA-3837) Report the name of the blocking thread when throwing ConcurrentModificationException

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

Bharat Viswanadham commented on KAFKA-3837:
-------------------------------------------

Hi Simon,
In the kafka consumer already we have thread ids stored.
I have printed the thread id, instead of thread name.
When concurrent modification exception occurred, now with help of thread id's we can know which thread has caused the problem.

> Report the name of the blocking thread when throwing ConcurrentModificationException
> ------------------------------------------------------------------------------------
>
>                 Key: KAFKA-3837
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3837
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>    Affects Versions: 0.9.0.1
>            Reporter: Simon Cooper
>            Assignee: Bharat Viswanadham
>            Priority: Minor
>
> {{KafkaConsumer.acquire}} throws {{ConcurrentModificationException}} if the current thread it does not match the {{currentThread}} field. It would be useful if the name of the other thread was included in the exception message to help debug the problem when this exception occurs.
> As it stands, it can be really difficult to work out what's going wrong when there's several threads all accessing the consumer at the same time, and your existing exclusive access logic doesn't seem to be working as it should.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)