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 2022/06/29 11:22:04 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request, #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

BewareMyPower opened a new pull request, #16285:
URL: https://github.com/apache/pulsar/pull/16285

   Fixes https://github.com/apache/pulsar/issues/15976
   
   ### Motivation
   
   Currently even if the producer, consumer, or reader failed to
   create, it would still be added to the producers or consumers in
   `Client`. `Client::close` first closes the internal producers and
   consumers, if the producers or consumers to close include failed
   producers or consumers, `Client::close` would return
   `ResultAlreadyClosed`. Even worse, closing a failed partitioned producer
   might stuck.
   
   It also makes the Python test `test_listener_name_client` flaky because
   `client.close()` will throw an exception if the underlying
   `Client::close` call in C++ client doesn't return `ResultOk`.
   
   ### Modifications
   
   - Only adding the created producer or consumer to the internal list of
     `Client` after the creation succeeded.
   - Add `ClientTest.testWrongListener` to verify when producer, consumer,
     reader failed to create, the internal producer list and consumer list
     are both empty. And `client.close()` would return `ResultOk`.
   
   ### Documentation
   
   Check the box below or label this PR directly.
   
   Need to update docs? 
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
     
   - [x] `doc-not-needed` 
   (Please explain why)
     
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `doc-complete`
   (Docs have been already added)


-- 
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] BewareMyPower commented on pull request #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #16285:
URL: https://github.com/apache/pulsar/pull/16285#issuecomment-1169863969

   In addition, `test_listener_name_client` uses a partitioned topic created by other tests. This bug can only be easily reproduced against a partitioned topic. See https://github.com/apache/pulsar/issues/15976#issuecomment-1158997785.


-- 
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] github-actions[bot] commented on pull request #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #16285:
URL: https://github.com/apache/pulsar/pull/16285#issuecomment-1170013410

   @BewareMyPower Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


-- 
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] BewareMyPower commented on pull request #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on PR #16285:
URL: https://github.com/apache/pulsar/pull/16285#issuecomment-1175146431

   @merlimat @lhotari @rdhabalia @jiazhai @gaoran10 @RobertIndie PTAL


-- 
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] github-actions[bot] commented on pull request #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #16285:
URL: https://github.com/apache/pulsar/pull/16285#issuecomment-1169863082

   @BewareMyPower Please provide a correct documentation label for your PR.
   Instructions see [Pulsar Documentation Label Guide](https://docs.google.com/document/d/1Qw7LHQdXWBW9t2-r-A7QdFDBwmZh6ytB4guwMoXHqc0).


-- 
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] BewareMyPower merged pull request #16285: [fix][C++ client] Fix the close of Client might stuck or return a wrong result

Posted by GitBox <gi...@apache.org>.
BewareMyPower merged PR #16285:
URL: https://github.com/apache/pulsar/pull/16285


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