pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] lonerzzz opened a new issue #6506: ConsumerImpl class exception on Timeout provides misleading error detail
Date Sat, 07 Mar 2020 03:34:08 GMT
lonerzzz opened a new issue #6506: ConsumerImpl class exception on Timeout provides misleading
error detail
URL: https://github.com/apache/pulsar/issues/6506
 
 
   **Describe the bug**
   The ConsumerImpl class internalReceive method throws an InterruptedException when the attempt
to receive a value times out. The exception is as follows:
   
   2020-03-07 00:05:29,782 WARN  org.apache.flink.streaming.runtime.tasks.StreamTask     
     - Error while canceling task.
   java.lang.Exception: org.apache.pulsar.client.api.PulsarClientException: java.lang.InterruptedException
           at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.checkThrowSourceExecutionException(SourceStreamTask.java:232)
           at org.apache.flink.streaming.runtime.tasks.SourceStreamTask.processInput(SourceStreamTask.java:133)
           at org.apache.flink.streaming.runtime.tasks.StreamTask.run(StreamTask.java:321)
           at org.apache.flink.streaming.runtime.tasks.StreamTask.runAndHandleCancel(StreamTask.java:286)
           at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:426)
           at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:705)
           at org.apache.flink.runtime.taskmanager.Task.run(Task.java:530)
           at java.lang.Thread.run(Thread.java:748)
   Caused by: org.apache.pulsar.client.api.PulsarClientException: java.lang.InterruptedException
           at org.apache.pulsar.client.api.PulsarClientException.unwrap(PulsarClientException.java:235)
           at org.apache.pulsar.client.impl.ConsumerImpl.internalReceive(ConsumerImpl.java:347)
           at org.apache.pulsar.client.impl.ConsumerBase.receive(ConsumerBase.java:165)
           at org.apache.flink.streaming.connectors.pulsar.PulsarConsumerSource.run(PulsarConsumerSource.java:128)
           at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:100)
           at org.apache.flink.streaming.api.operators.StreamSource.run(StreamSource.java:63)
           at org.apache.flink.streaming.runtime.tasks.SourceStreamTask$LegacySourceFunctionThread.run(SourceStreamTask.java:208)
   Caused by: java.lang.InterruptedException
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
           at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2088)
           at org.apache.pulsar.common.util.collections.GrowableArrayBlockingQueue.poll(GrowableArrayBlockingQueue.java:203)
           at org.apache.pulsar.client.impl.ConsumerImpl.internalReceive(ConsumerImpl.java:337)
           ... 5 more
   
   Unfortunately, the Exception that is logged is long with information that is not helpful
for diagnosis. It does not really indicate what is happening - an InterruptedException does
not clearly convey that a timeout has occurred. The message "Error while cancelling task"
is equally confusing and does not get to the root of the problem.
   
   **To Reproduce**
   Not provided because this a design bug rather than a runtime bug. A suggested design alternative
has been provided.
   
   **Expected behavior**
   In the exception to be thrown it should have accompanying text indicating that the Pulsar
Consumer timed out while trying to retrieve a message. The exception text should also indicate
the duration of the timeout so that the timeout value could be modified if applicable.
   
   **Screenshots**
   Not applicable
   
    - OS: Ubuntu latest release, patch current running the latest version of the Java JRE.
   
   **Additional context**
   None

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message