You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/06/21 17:03:37 UTC

[GitHub] [pulsar-client-go] everesio opened a new issue #293: Incorrect usage of context.Context in the producer Send and SendAsync methods

everesio opened a new issue #293:
URL: https://github.com/apache/pulsar-client-go/issues/293


   The context.Context parameter of the producer Send and SendAsync methods is not used correctly.
   When the pulsar sever is down:
   
   a. Send method hangs forever waiting on wg.Wait() in the partitionProducer::Send
   b. SendAsync callback is never invoked.
   
   In both cases context timeout was ignored.
   Additionally blocked Sync can prevent application shutdown e.g. result of the context cancellation due to SIGINT.
   
   #### Expected behavior
   Error after context timeout / context cancellation.   
   
   #### Actual behavior
   Method blocked forever, callback is not invoked with error
   
   #### Steps to reproduce
   1. Service starts up and produces message 
   2. Pulsar server shutdown
   3A. Service send a message with context.WithTimeout   
   3B. SIGINT cancels the from context.WithCancel   
   
   #### System configuration
   2.5.2
   


----------------------------------------------------------------
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



[GitHub] [pulsar-client-go] wolfstudy commented on issue #293: Incorrect usage of context.Context in the producer Send and SendAsync methods

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #293:
URL: https://github.com/apache/pulsar-client-go/issues/293#issuecomment-647223563


   @everesio Thanks feedback, About context timeout logic of producer, the https://github.com/apache/pulsar-client-go/pull/252 is trying to solve. Currently,  does not support logic related to context timeout in producer.


----------------------------------------------------------------
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