Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C++] Handle error when shutting down client after forks #11954

Merged
merged 2 commits into from
Sep 8, 2021

Conversation

merlimat
Copy link
Contributor

@merlimat merlimat commented Sep 7, 2021

Motivation

Fix #11953

After a fork() call, the threads are not getting ported to the child process (at least not most of them). When we're shutting down the pulsar client, we should handle the exception

I didn't add a specific error check since there's no portable error code to be used.

@merlimat merlimat added type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages component/c++ doc-not-needed Your PR changes do not impact docs release/2.8.2 labels Sep 7, 2021
@merlimat merlimat added this to the 2.9.0 milestone Sep 7, 2021
@merlimat merlimat self-assigned this Sep 7, 2021
@merlimat merlimat merged commit 2858ed0 into apache:master Sep 8, 2021
@merlimat merlimat deleted the c++-fork-shutdown branch September 8, 2021 01:37
codelipenghui pushed a commit that referenced this pull request Sep 9, 2021
* [C++] Handle error when shutting down client after forks

* Fixed formatting

(cherry picked from commit 2858ed0)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 9, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
* [C++] Handle error when shutting down client after forks

* Fixed formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-picked/branch-2.8 Archived: 2.8 is end of life doc-not-needed Your PR changes do not impact docs release/2.8.2 release/2.9.0 type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C++ client (via Python bindings) aborts and hangs in child processes and is generally not fork-safe
4 participants