[jdk17u-dev] RFR: 8276660: Scalability bottleneck in java.security.Provider.getService()
Dan Lutker
dlutker at openjdk.org
Mon Jul 22 16:35:41 UTC 2024
Backporting [JDK-8276660](https://bugs.openjdk.org/browse/JDK-8276660) which also fixes a bug in SecureRandom registration that was exposed during testing of https://github.com/corretto/amazon-corretto-crypto-provider. Currently, if you register a new provider then `new SecureRandom` doesn't work right away and only after making some other call like `Cipher.getInstance()` does it return the ACCP provided SecureRandom.
Ran all "java/security/Provider/", "jdk/jfr/event/" and tier1 tests locally on Linux x64 and they passed.
"[JDK-8254711](https://bugs.openjdk.org/browse/JDK-8254711): Add java.security.Provider.getService JFR Event" makes changes some of the same functioned but was different in 17u than upstream. To get a cleaner backport I reverted it locally, backported [JDK-8276660](https://bugs.openjdk.org/browse/JDK-8276660) and then re-applied 8254711 to get the updated code around the Map changes.
Also backporting the followup fixes:
8292739: Invalid legacy entries may be returned by Provider.getServic…
8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660
-------------
Commit messages:
- Backport 14623c6087105a4228ff190e9e27372729b2bc4b
- Backport 0f4807e8fe2468f303b32a6f2dc9ccc7ecad82a1
- 8254711: Add java.security.Provider.getService JFR Event
- Backport 9b747491de01fd011b09668a67113e80c2b7c70
- Revert "8254711: Add java.security.Provider.getService JFR Event"
Changes: https://git.openjdk.org/jdk17u-dev/pull/2730/files
Webrev: https://webrevs.openjdk.org/?repo=jdk17u-dev&pr=2730&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8276660
Stats: 400 lines in 2 files changed: 168 ins; 97 del; 135 mod
Patch: https://git.openjdk.org/jdk17u-dev/pull/2730.diff
Fetch: git fetch https://git.openjdk.org/jdk17u-dev.git pull/2730/head:pull/2730
PR: https://git.openjdk.org/jdk17u-dev/pull/2730
More information about the jdk-updates-dev
mailing list