You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "parakhnr (via GitHub)" <gi...@apache.org> on 2023/04/15 00:21:43 UTC

[GitHub] [helix] parakhnr opened a new pull request, #2450: Fixing the ZkServer.start() to just check for free port when starting ZK locally

parakhnr opened a new pull request, #2450:
URL: https://github.com/apache/helix/pull/2450

   ### Issues
   
   - [ ] My PR addresses the following Helix issues and references them in the PR description:
   
   Starting a ZK server is very time consuming and it's affecting the productivity while performing debugging integration tests. This PR tries aims to optimize the start time.
   
   ### Description
   
   - [ ] Here are some details about my PR, including screenshots of any UI changes:
   
   Currently `ZkServer.start()` queries all of the network interfaces to find if `localhost` is present in the interfaces whereas it will always be present since we manually add [localhost](https://github.com/apache/helix/blob/386a77d566f1dc0b480c3bcbdb4a2880a8b8a4a9/zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/NetworkUtil.java#L43) to the list of resolved network ips and hostnames.  The call to `NetworkInterface.getNetworkInterfaces` is very expensive and is the reason for the increased time to start the Zk server. Also, the sad part is we invoke the same method twice one just for logging and other for verifying 😞 
   
   Since ZKServer never accepts and Zk hostname to connect the check to verify if the port is busy should be sufficient. 
   
   ### Tests
   
   `ZkServer` is utility class and doesn't have any unit tests. However since the other integration tests uses this class to spin up a ZK server, they will be tested as part of the CI. I ensured Helix examples ran successfully.
   
   ### Changes that Break Backward Compatibility (Optional)
   
   N/A
   
   ### Documentation (Optional)
   
   N/A
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   Yes.
   


-- 
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: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org


[GitHub] [helix] parakhnr closed pull request #2450: Fixing the ZkServer.start() to just check for free port when starting Zk

Posted by "parakhnr (via GitHub)" <gi...@apache.org>.
parakhnr closed pull request #2450: Fixing the ZkServer.start() to just check for free port when starting Zk
URL: https://github.com/apache/helix/pull/2450


-- 
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: reviews-unsubscribe@helix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org