You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "dlg99 (via GitHub)" <gi...@apache.org> on 2024/08/26 18:03:12 UTC
[PR] [fix] StatsOutputStream: add string write function (#308) [pulsar]
dlg99 opened a new pull request, #23227:
URL: https://github.com/apache/pulsar/pull/23227
### Motivation
On a specific environment /metrics end point timed out consistently, logs contained the exception below.
Applied fix has resolved the issue.
The fix does not make much sense as String implements CharSequence, so I suspect we hit some weird issue with JIT or jvm.
The JDK is Timurin build 17.0.12+7, I could not repro this locally but it consistently happened in the env.
```
2024-08-23T20:40:42,618+0000 [pulsar-stats-updater-OrderedScheduler-0-0] WARN org.apache.bookkeeper.common.util.SingleThreadSafeScheduledExecutorService - Unexpected throwable from task class com.google.common.util.concurrent.MoreExecutors$ScheduledListeningDecorator$NeverSuccessfulListenableFutureTask: 'org.apache.pulsar.common.util.SimpleTextOutputStream org.apache.pulsar.common.util.SimpleTextOutputStream.write(java.lang.String)'
java.lang.NoSuchMethodError: 'org.apache.pulsar.common.util.SimpleTextOutputStream org.apache.pulsar.common.util.SimpleTextOutputStream.write(java.lang.String)'
at org.apache.pulsar.utils.StatsOutputStream.startObject(StatsOutputStream.java:41) ~[com.datastax.oss-pulsar-broker-3.1.3.1.jar:3.1.3.1]
at org.apache.pulsar.broker.service.PulsarStats.lambda$updateStats$4(PulsarStats.java:126) ~[com.datastax.oss-pulsar-broker-3.1.3.1.jar:3.1.3.1]
at org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap$Section.forEach(ConcurrentOpenHashMap.java:563) ~[com.datastax.oss-pulsar-common-3.1.3.1.jar:3.1.3.1]
at org.apache.pulsar.common.util.collections.ConcurrentOpenHashMap.forEach(ConcurrentOpenHashMap.java:277) ~[com.datastax.oss-pulsar-common-3.1.3.1.jar:3.1.3.1]
at org.apache.pulsar.broker.service.PulsarStats.updateStats(PulsarStats.java:120) ~[com.datastax.oss-pulsar-broker-3.1.3.1.jar:3.1.3.1]
at org.apache.pulsar.broker.service.BrokerService.updateRates(BrokerService.java:2065) ~[com.datastax.oss-pulsar-broker-3.1.3.1.jar:3.1.3.1]
at com.google.common.util.concurrent.MoreExecutors$ScheduledListeningDecorator$NeverSuccessfulListenableFutureTask.run(MoreExecutors.java:741) ~[com.google.guava-guava-32.1.1-jre.jar:?]
at org.apache.bookkeeper.common.util.SingleThreadSafeScheduledExecutorService$SafeRunnable.run(SingleThreadSafeScheduledExecutorService.java:46) ~[org.apache.bookkeeper-bookkeeper-common-4.16.4.jar:4.16.4]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[io.netty-netty-common-4.1.108.Final.jar:4.1.108.Final]
at java.lang.Thread.run(Thread.java:840) ~[?:?]
```
### Modifications
Added method that takes String parameter explicitly.
Such method existed up until the change https://github.com/apache/pulsar/pull/22494
### Verifying this change
- [ ] Make sure that the change passes the CI checks.
Verified in the env where the problem reproduces
### Does this pull request potentially affect one of the following parts:
**NO**
<!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
*If the box was checked, please highlight the changes*
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
### 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 -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
### Matching PR in forked repository
PR in forked repository: https://github.com/datastax/pulsar/pull/308
<!--
After opening this PR, the build in apache/pulsar will fail and instructions will
be provided for opening a PR in the PR author's forked repository.
apache/pulsar pull requests should be first tested in your own fork since the
apache/pulsar CI based on GitHub Actions has constrained resources and quota.
GitHub Actions provides separate quota for pull requests that are executed in
a forked repository.
The tests will be run in the forked repository until all PR review comments have
been handled, the tests pass and the PR is approved by a reviewer.
-->
--
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] [fix] StatsOutputStream: add string write function (#308) [pulsar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #23227:
URL: https://github.com/apache/pulsar/pull/23227#issuecomment-2310911844
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/23227?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 74.52%. Comparing base [(`bbc6224`)](https://app.codecov.io/gh/apache/pulsar/commit/bbc62245c5ddba1de4b1e7cee4ab49334bc36277?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`a6e1075`)](https://app.codecov.io/gh/apache/pulsar/commit/a6e107549e102755fbd2c3e875a41613443fdbd1?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 545 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/pulsar/pull/23227?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #23227 +/- ##
============================================
+ Coverage 73.57% 74.52% +0.95%
- Complexity 32624 34225 +1601
============================================
Files 1877 1922 +45
Lines 139502 144758 +5256
Branches 15299 15832 +533
============================================
+ Hits 102638 107884 +5246
+ Misses 28908 28608 -300
- Partials 7956 8266 +310
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/23227/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/23227/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `27.66% <50.00%> (+3.08%)` | :arrow_up: |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/23227/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `24.67% <50.00%> (+0.34%)` | :arrow_up: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/23227/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.88% <100.00%> (+1.04%)` | :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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files](https://app.codecov.io/gh/apache/pulsar/pull/23227?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...che/pulsar/common/util/SimpleTextOutputStream.java](https://app.codecov.io/gh/apache/pulsar/pull/23227?src=pr&el=tree&filepath=pulsar-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fcommon%2Futil%2FSimpleTextOutputStream.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi91dGlsL1NpbXBsZVRleHRPdXRwdXRTdHJlYW0uamF2YQ==) | `88.40% <100.00%> (-1.25%)` | :arrow_down: |
... and [535 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/23227/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
--
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] [fix] StatsOutputStream: add string write function (#308) [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #23227:
URL: https://github.com/apache/pulsar/pull/23227
--
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