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/12/09 21:06:12 UTC

[GitHub] [pulsar-client-go] zzzming opened a new pull request #411: close dangling autoDiscovery goroutine in consumer

zzzming opened a new pull request #411:
URL: https://github.com/apache/pulsar-client-go/pull/411


   ### Motivation
   
   The goroutine for auto discovery partitions has never been closed even when consumer is Close()
   https://github.com/apache/pulsar-client-go/blob/v0.3.0/pulsar/consumer_impl.go#L236
   
   Currently consumer Close() will stop() the ticker, however, Stop() does not close the ticker's channel. The behaviour is described at https://golang.org/pkg/time/#Ticker.Stop
   
   This bug can leave a large number of dangling goroutines, that results in high CPU consumption.
   
   ### Modifications
   
   The fix is to introduce a signal channel to send a signal to terminate the partition auto discovery goroutine upon consumer Close().
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API: no
     - The schema: no
     - The default values of configurations: no
     - The wire protocol: no
   
   ### Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? (not applicable)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a followup issue for adding the documentation
   


----------------------------------------------------------------
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] merlimat merged pull request #411: close dangling autoDiscovery goroutine in consumer

Posted by GitBox <gi...@apache.org>.
merlimat merged pull request #411:
URL: https://github.com/apache/pulsar-client-go/pull/411


   


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