You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "massakam (via GitHub)" <gi...@apache.org> on 2023/02/24 11:20:28 UTC
[GitHub] [pulsar] massakam opened a new pull request, #19633: [fix][broker] Embed stringified exception in placeholder in log message
massakam opened a new pull request, #19633:
URL: https://github.com/apache/pulsar/pull/19633
### Motivation
I noticed the following warn log output on a broker server.
```
14:03:44.580 [pulsar-io-24-26] WARN o.a.pulsar.broker.service.ServerCnx - [/xxx.xxx.xxx.xxx:35144] Got exception {}
io.netty.channel.unix.Errors$NativeIoException: readAddress(..) failed: Connection reset by peer
```
I think the expected behavior is that the summary of the exception `cause` is embedded in the placeholder `{}`, but actually the stacktrace is printed.
https://github.com/apache/pulsar/blob/6d3e483bab0f960b21cb521fb3908eccd55993b6/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java#L389-L391
Apparently, exceptions are embedded when log4j2 is used, but not when logback is used.
### Modifications
Stringify `cause` to embed it in the placeholder.
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
### Documentation
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `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] codecov-commenter commented on pull request #19633: [fix][broker] Embed stringified exception in placeholder in log message
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19633:
URL: https://github.com/apache/pulsar/pull/19633#issuecomment-1447570128
# [Codecov](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#19633](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6645896) into [master](https://codecov.io/gh/apache/pulsar/commit/dc02c404223db757702a8e1318e970adc37a660b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dc02c40) will **increase** coverage by `1.57%`.
> The diff coverage is `50.00%`.
[](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #19633 +/- ##
============================================
+ Coverage 60.29% 61.86% +1.57%
+ Complexity 3496 3400 -96
============================================
Files 1832 1844 +12
Lines 135338 135527 +189
Branches 14904 14917 +13
============================================
+ Hits 81601 83843 +2242
+ Misses 46143 43963 -2180
- Partials 7594 7721 +127
```
| Flag | Coverage Δ | |
|---|---|---|
| inttests | `24.61% <0.00%> (+0.10%)` | :arrow_up: |
| systests | `25.16% <0.00%> (?)` | |
| unittests | `59.03% <50.00%> (+0.05%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...va/org/apache/pulsar/broker/service/ServerCnx.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1NlcnZlckNueC5qYXZh) | `54.72% <50.00%> (+0.53%)` | :arrow_up: |
| [.../apache/pulsar/websocket/data/ConsumerCommand.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLXdlYnNvY2tldC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL3dlYnNvY2tldC9kYXRhL0NvbnN1bWVyQ29tbWFuZC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...r/client/impl/UnAckedMessageRedeliveryTracker.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1VuQWNrZWRNZXNzYWdlUmVkZWxpdmVyeVRyYWNrZXIuamF2YQ==) | `0.00% <0.00%> (-88.29%)` | :arrow_down: |
| [...ache/pulsar/client/impl/UnackMessageIdWrapper.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1VuYWNrTWVzc2FnZUlkV3JhcHBlci5qYXZh) | `0.00% <0.00%> (-72.42%)` | :arrow_down: |
| [...sar/client/impl/BatchMessageKeyBasedContainer.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0JhdGNoTWVzc2FnZUtleUJhc2VkQ29udGFpbmVyLmphdmE=) | `0.00% <0.00%> (-59.58%)` | :arrow_down: |
| [...che/pulsar/client/impl/KeyBasedBatcherBuilder.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL0tleUJhc2VkQmF0Y2hlckJ1aWxkZXIuamF2YQ==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [...apache/pulsar/broker/service/TopicListService.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL1RvcGljTGlzdFNlcnZpY2UuamF2YQ==) | `15.20% <0.00%> (-37.60%)` | :arrow_down: |
| [...pulsar/metadata/impl/MetadataStoreFactoryImpl.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLW1ldGFkYXRhL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvbWV0YWRhdGEvaW1wbC9NZXRhZGF0YVN0b3JlRmFjdG9yeUltcGwuamF2YQ==) | `55.00% <0.00%> (-25.00%)` | :arrow_down: |
| [...a/org/apache/pulsar/client/impl/TableViewImpl.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1RhYmxlVmlld0ltcGwuamF2YQ==) | `61.66% <0.00%> (-24.17%)` | :arrow_down: |
| [...ar/client/impl/PatternMultiTopicsConsumerImpl.java](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NsaWVudC9pbXBsL1BhdHRlcm5NdWx0aVRvcGljc0NvbnN1bWVySW1wbC5qYXZh) | `64.15% <0.00%> (-19.82%)` | :arrow_down: |
| ... and [265 more](https://codecov.io/gh/apache/pulsar/pull/19633?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
--
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] nkurihar merged pull request #19633: [fix][broker] Embed stringified exception in placeholder in log message
Posted by "nkurihar (via GitHub)" <gi...@apache.org>.
nkurihar merged PR #19633:
URL: https://github.com/apache/pulsar/pull/19633
--
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