You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "zhanglistar (via GitHub)" <gi...@apache.org> on 2026/03/08 10:14:15 UTC
[PR] [Test] Fix log after client close [pulsar-client-cpp]
zhanglistar opened a new pull request, #548:
URL: https://github.com/apache/pulsar-client-cpp/pull/548
<!-- Either this PR fixes an issue, -->
Fixes #530
<!-- or this PR is one task of an issue -->
### Motivation
When Python/C++ bindings create C++ ProducerImpl/ConsumerImpl objects and the Python interpreter shuts down, C++ destructors may run after the client is already closed.
This causes logging attempts during static/global cleanup which is dangerous because logging systems might already be torn down. Issue #530 identified this problem: "We
should not print logs after client is closed".
### Modifications
1. Changed ProducerImpl::printStats() from LOG_INFO to LOG_DEBUG
2. Added client existence checks in ProducerImpl destructor before logging warnings
3. Added client existence checks in ConsumerImpl destructor before logging warnings
4. Downgraded ConsumerImpl race condition closure log from INFO to DEBUG
5. When client is already destroyed, log at DEBUG level instead of WARN
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is already covered by existing tests, such as ProducerTest and ConsumerTest which exercise producer/consumer lifecycle.
--
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
Re: [PR] [Test] Fix log after client close [pulsar-client-cpp]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower merged PR #548:
URL: https://github.com/apache/pulsar-client-cpp/pull/548
--
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