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 2021/09/25 15:52:53 UTC

[GitHub] [pulsar-client-go] PowerStateFailure opened a new pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

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


   Currently, every consumer created by `client.Subscribe()` call is registered into `client.handlers` map so that it can be disposed on `client.Closed` if it is still active. According to `(*consumer).Close()` implementation, entity is supposed to remove itself from `client.handlers` when gets disposed, but it's not implemented for multitopic consumer, regexp consumer and reader, so even after user closes them, their memory remains reachable, causing hard-to-debug memory leak.
   
   This PR fixes such leakage by forcing multitopic consumer, regexp consumer and reader to remove themself from `client.handlers` map on `Close`.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API: (yes / **no**)
     - The schema: (yes / **no** / don't know)
     - The default values of configurations: (yes / **no**)
     - The wire protocol: (yes / **no**)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / GoDocs / not documented)
     - 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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-928867357






-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] cckellogg commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
cckellogg commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-927495983


   LGTM any idea on why the CI is failing?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-929293963


   ping @PowerStateFailure please merge master code and fix the action CI, thanks.
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-939244214


   ping @PowerStateFailure please merge master code and fix the action CI, thanks.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-928870143


   > LGTM any idea on why the CI is failing?
   
   It looks like the release of version 2.8.1 caused CI to not work properly


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy commented on pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on pull request #620:
URL: https://github.com/apache/pulsar-client-go/pull/620#issuecomment-928867357


   ```
   --- FAIL: TestNamespaceTopicsNamespaceDoesNotExit (54.80s)
       client_impl_test.go:387: 
           	Error Trace:	client_impl_test.go:387
           	Error:      	Expected nil, but got: &errors.errorString{s:"server error: AuthorizationError: Exception occurred while trying to authorize GetTopicsOfNamespace"}
           	Test:       	TestNamespaceTopicsNamespaceDoesNotExit
   ```


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar-client-go] wolfstudy merged pull request #620: Fix multitopic- and regexp consumers not removed from client handlers on Close

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


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org