You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "BewareMyPower (via GitHub)" <gi...@apache.org> on 2024/08/24 07:16:34 UTC
[PR] [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK [pulsar]
BewareMyPower opened a new pull request, #23216:
URL: https://github.com/apache/pulsar/pull/23216
### Motivation
See https://github.com/apache/pulsar/issues/23215
### Modifications
For broker related modules, including `pulsar-broker`, `pulsar-websocket`, `managed-ledger`,
- Replace all `ConcurrentOpenHashMap<T>` with `ConcurrentHashMap<T>`
- Replace all `ConcurrentOpenHashSet<T>` fields with `ConcurrentHashMap<T, Boolean>`
- Replace unnecessary reflections in tests
- Remove `ConcurrentOpenHashSet` since it's never used now
### 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: <!-- 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
Re: [PR] [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK [pulsar]
Posted by "ocadaruma (via GitHub)" <gi...@apache.org>.
ocadaruma commented on PR #23216:
URL: https://github.com/apache/pulsar/pull/23216#issuecomment-2308575459
Hi, the change looks make sense.
For `ConcurrentOpenHashSet`, how about replacing type declarations with `Set` and use `ConcurrentHashMap.newKeySet()` ?
To express the `Set` type, it's more straightforward than `ConcurrentHashMap<T, Boolean>` and helps the reader IMO.
--
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] [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari closed pull request #23216: [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK
URL: https://github.com/apache/pulsar/pull/23216
--
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] [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari commented on PR #23216:
URL: https://github.com/apache/pulsar/pull/23216#issuecomment-2402327535
Closing since the changes have been made in other PRs.
--
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] [improve][broker] Replace all ConcurrentOpenHashMap with the official ConcurrentHashMap in JDK [pulsar]
Posted by "BewareMyPower (via GitHub)" <gi...@apache.org>.
BewareMyPower commented on PR #23216:
URL: https://github.com/apache/pulsar/pull/23216#issuecomment-2308715558
> declarations with Set and use ConcurrentHashMap.newKeySet() ?
Good suggestion. I will adopt this suggestion.
BTW, I will split this PR into multiple parts because of there are many changes. So let me mark it drafted now and push more PRs.
--
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