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/09/16 09:50:36 UTC

[GitHub] [pulsar] nahguam opened a new pull request, #17695: [improve][common] Remove reflection from DnsResolverUtil

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

   ## Motivation
   
   DnsResolverUtil uses reflection to get DNS cache policy ttl and negative ttl settings from sun.net.InetAddressCachePolicy. This results in IllegalAccessException if `--add-opens java.base/sun.net=ALL-UNNAMED` has not been added to the JVM flags.
   
   These two settings are available as system security properties as documented https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/doc-files/net-properties.html in the Address Cache section.
   
   ## Changes
   
   * Replace the reflection with lookups of `networkaddress.cache.ttl` and `networkaddress.cache.negative.ttl` properties respectively
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   
   ### Does this pull request potentially affect one of the following parts:
   
   *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 binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc-required` 
   (Your PR needs to update docs and you will update later)
   
   - [x] `doc-not-needed` 
   (Please explain why)
   
   - [ ] `doc` 
   (Your PR contains doc changes)
   
   - [ ] `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] merlimat commented on pull request #17695: [improve][common] Remove reflection from DnsResolverUtil

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

   @nahguam Perhaps we could keep using reflection and fallback to read the properties when the exception is thrown. 


-- 
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] nahguam closed pull request #17695: [improve][common] Remove reflection from DnsResolverUtil

Posted by GitBox <gi...@apache.org>.
nahguam closed pull request #17695: [improve][common] Remove reflection from DnsResolverUtil
URL: https://github.com/apache/pulsar/pull/17695


-- 
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] nahguam commented on pull request #17695: [improve][common] Remove reflection from DnsResolverUtil

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

   Needs more thought


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