flowchartsman opened a new pull request, #898:
URL: https://github.com/apache/pulsar-client-go/pull/898

   Fixes #897
   
   Am not certain if this is the right place or behavior, so opening it up for 
comments.  It might be that it is fine to panic on a `Flush()` to a 
non-batching producer, provided it's explicitly documented, but probably not. 
It's worth noting that it worked in the past, which is how I ran into the issue 
in the first place, since I left an errant `Flush()` call behind in some tests 
after disabling batching on a producer.
   
   Master Issue: #<xyz>
   
   ### Motivation
   
   No one wants a panic, especially one that is undocumented.
   
   ### Modifications
   
   nil check.
   
   ### Verifying this change
   
   - [X] Make sure that the change passes the CI checks.
   
   I've included tests.
   
   ### Documentation
   
   Since this issue would normally cause a panic, it's probably not necessary 
to document anything special, especially considering that a similar check is 
made elsewhere throughout the code. If requested, I can add a comment to the 
`Flush()` Godoc mentioning that it is a no-op for non-batching producers.


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to