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/12/26 12:49:00 UTC

[GitHub] [pulsar] gaoran10 opened a new pull request, #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

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

   ### Motivation
   
   Most of the tests are all based on the class `TestRetrySupport`, which supports resetting the broken test environments, the `ProxyServiceStarter` will register metrics in the default collector registry if we restart the `ProxyServiceStarter`, it will throw the exception like this.
   
   ```
   java.lang.IllegalArgumentException: Failed to register Collector of type Gauge: jvm_memory_direct_bytes_used is already in use by another Collector of type Gauge
   ```
   
   ### Modifications
   
   Clean up the default collector registry when closing the ProxyServiceStarter.
   
   ### Verifying this change
   
   This change is already covered by existing tests.
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- 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. Please attach the local preview screenshots (run `sh start.sh` at `pulsar/site2/website`) to your PR description, or else your PR might not get merged. -->
   - [ ] `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: <!-- ENTER URL HERE -->
   
   <!--
   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


[GitHub] [pulsar] codelipenghui merged pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

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


-- 
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] lhotari commented on pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

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

   This change has to be reverted or revisited since it's causing a lot of build failures. The issue is #19216.
   
   Counters registered in static field initializers such as https://github.com/apache/pulsar/blob/accae9f371f87dcf0b2a2f8d4ed277b742bfdc5f/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyService.java#L137-L138 won't get re-registered and that's why this change makes another test break.


-- 
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] gaoran10 closed pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

Posted by GitBox <gi...@apache.org>.
gaoran10 closed pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter
URL: https://github.com/apache/pulsar/pull/19062


-- 
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] codelipenghui commented on pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

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

   /pulsarbot run-failure-checks


-- 
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 #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #19062:
URL: https://github.com/apache/pulsar/pull/19062#issuecomment-1365206531

   # [Codecov](https://codecov.io/gh/apache/pulsar/pull/19062?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 [#19062](https://codecov.io/gh/apache/pulsar/pull/19062?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9745033) into [master](https://codecov.io/gh/apache/pulsar/commit/b42aed18dac4f04245ded0bf746b3f4e1c352243?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b42aed1) will **decrease** coverage by `10.38%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/pulsar/pull/19062/graphs/tree.svg?width=650&height=150&src=pr&token=acYqCpsK9J&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/pulsar/pull/19062?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   #19062       +/-   ##
   =============================================
   - Coverage     47.11%   36.73%   -10.39%     
   + Complexity    10595     1958     -8637     
   =============================================
     Files           710      209      -501     
     Lines         69423    14434    -54989     
     Branches       7449     1574     -5875     
   =============================================
   - Hits          32709     5302    -27407     
   + Misses        33037     8555    -24482     
   + Partials       3677      577     -3100     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | unittests | `36.73% <ø> (-10.39%)` | :arrow_down: |
   
   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/19062?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...pache/pulsar/proxy/server/ProxyServiceStarter.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLXByb3h5L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvcHJveHkvc2VydmVyL1Byb3h5U2VydmljZVN0YXJ0ZXIuamF2YQ==) | | |
   | [...ava/org/apache/pulsar/broker/stats/TimeWindow.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zdGF0cy9UaW1lV2luZG93LmphdmE=) | | |
   | [...s/prometheus/metrics/PrometheusTextFormatUtil.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zdGF0cy9wcm9tZXRoZXVzL21ldHJpY3MvUHJvbWV0aGV1c1RleHRGb3JtYXRVdGlsLmphdmE=) | | |
   | [.../org/apache/pulsar/broker/admin/v1/Properties.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi92MS9Qcm9wZXJ0aWVzLmphdmE=) | | |
   | [...istentStreamingDispatcherSingleActiveConsumer.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9zZXJ2aWNlL3BlcnNpc3RlbnQvUGVyc2lzdGVudFN0cmVhbWluZ0Rpc3BhdGNoZXJTaW5nbGVBY3RpdmVDb25zdW1lci5qYXZh) | | |
   | [...pulsar/broker/admin/impl/PersistentTopicsBase.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9hZG1pbi9pbXBsL1BlcnNpc3RlbnRUb3BpY3NCYXNlLmphdmE=) | | |
   | [...balance/impl/SimpleResourceAllocationPolicies.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9pbXBsL1NpbXBsZVJlc291cmNlQWxsb2NhdGlvblBvbGljaWVzLmphdmE=) | | |
   | [...va/org/apache/pulsar/utils/PulsarKeyException.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL3V0aWxzL1B1bHNhcktleUV4Y2VwdGlvbi5qYXZh) | | |
   | [...ar/common/naming/PartitionedManagedLedgerInfo.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2NvbW1vbi9uYW1pbmcvUGFydGl0aW9uZWRNYW5hZ2VkTGVkZ2VySW5mby5qYXZh) | | |
   | [...r/loadbalance/impl/GenericBrokerHostUsageImpl.java](https://codecov.io/gh/apache/pulsar/pull/19062/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHVsc2FyLWJyb2tlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2Jyb2tlci9sb2FkYmFsYW5jZS9pbXBsL0dlbmVyaWNCcm9rZXJIb3N0VXNhZ2VJbXBsLmphdmE=) | | |
   | ... and [491 more](https://codecov.io/gh/apache/pulsar/pull/19062/diff?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] lhotari commented on pull request #19062: [fix][proxy] Cleanup default collector registry when closing the ProxyServiceStarter

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

   I'm working on a revisited change. 


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