You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2018/08/03 10:06:56 UTC

[GitHub] chetanmeh commented on issue #3921: Synchronize access to the KafkaConsumer.

chetanmeh commented on issue #3921: Synchronize access to the KafkaConsumer.
URL: https://github.com/apache/incubator-openwhisk/pull/3921#issuecomment-410208766
 
 
   If I see the code path within `consumer.endOffsets` API call then I do not see any non threadsafe usage. It uses `Fetcher` which internally uses [ConsumerNetworkClient][1] which is marked as thread safe. And it does not uses current consumer state in any place.
   
   One issue with current code is that `offset` is accessed in unsafe manner and which can end up in wrong metric reporting. 
   
   But as the `consumer` is non thread safe we should address that. However it may not fix the root cause
   
   [1]: https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/consumer/internals/ConsumerNetworkClient.java#L53

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services