You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/04 04:25:38 UTC

[GitHub] [helix] kaisun2000 opened a new pull request #1213: Identify and eliminate TaskModel Thread #1201

kaisun2000 opened a new pull request #1213:
URL: https://github.com/apache/helix/pull/1213


   ### Issues
   
   - [x] My PR addresses the following Helix issues and references them in the PR description:
   
   Fix #1202 
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI changes:
   
   HelixTaskExcutor thread pool has not unqiue name. Assign unique
   name. Also, for TaskModelFactory related test, there are leaks
   in a test. Eliminate the leak.
   
   ### Tests
   
   - [ ] The following tests are written for this issue:
   
   (List the names of added unit/integration tests)
   
   - [x] The following is the result of the "mvn test" command on the appropriate module:
   
   running
   
   ### 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"
   
   ### Documentation (Optional)
   
   - [ ] In case of new functionality, my PR adds documentation in the following wiki page:
   
   (Link the GitHub wiki you added)
   
   ### Code Quality
   
   - [ ] My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)


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

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] pkuwm merged pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
pkuwm merged pull request #1213:
URL: https://github.com/apache/helix/pull/1213


   


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

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] kaisun2000 commented on pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on pull request #1213:
URL: https://github.com/apache/helix/pull/1213#issuecomment-668885908


   This diff is approved. Please help to merge into trunk.
   
   >HelixTaskExcutor thread pool has not unqiue name. Assign unique
   name. Also, for TaskModelFactory related test, there are leaks
   in a test. Eliminate the leak.


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

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] kaisun2000 commented on pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on pull request #1213:
URL: https://github.com/apache/helix/pull/1213#issuecomment-670656409


   The pull request is approved, please help to merge into trunk.
   
   >HelixTaskExcutor thread pool has not unqiue name. Assign unique
   name. Also, for TaskModelFactory related test, there are leaks
   in a test. Eliminate the leak.


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

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] jiajunwang commented on pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
jiajunwang commented on pull request #1213:
URL: https://github.com/apache/helix/pull/1213#issuecomment-669359584


   I can help to merge once the test results are post : ) @kaisun2000 


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

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] mgao0 commented on a change in pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
mgao0 commented on a change in pull request #1213:
URL: https://github.com/apache/helix/pull/1213#discussion_r467209330



##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
##########
@@ -209,7 +211,7 @@ public void registerMessageHandlerFactory(String type, MessageHandlerFactory fac
     if (prevItem == null) {
       ExecutorService newPool = Executors.newFixedThreadPool(threadpoolSize, new ThreadFactory() {
         @Override public Thread newThread(Runnable r) {
-          return new Thread(r, "HelixTaskExecutor-message_handle_thread");
+          return new Thread(r, "HelixTaskExecutor-message_handle_thread_" + thread_uid.getAndIncrement());

Review comment:
       Not related to your change. I'm wondering if we should make this daemon thread? @jiajunwang 




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

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] kaisun2000 commented on a change in pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on a change in pull request #1213:
URL: https://github.com/apache/helix/pull/1213#discussion_r467234179



##########
File path: helix-core/src/main/java/org/apache/helix/messaging/handling/HelixTaskExecutor.java
##########
@@ -209,7 +211,7 @@ public void registerMessageHandlerFactory(String type, MessageHandlerFactory fac
     if (prevItem == null) {
       ExecutorService newPool = Executors.newFixedThreadPool(threadpoolSize, new ThreadFactory() {
         @Override public Thread newThread(Runnable r) {
-          return new Thread(r, "HelixTaskExecutor-message_handle_thread");
+          return new Thread(r, "HelixTaskExecutor-message_handle_thread_" + thread_uid.getAndIncrement());

Review comment:
       Daemon thread is just to make sure that JVM can shutdown automatically when main thread ( and all other non daemon thread) exit. It is similar to you Unix machine restart, daemon process won't block it from restarting, but your forground process, say intellij can block the restart of Unix machine.




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

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] kaisun2000 commented on pull request #1213: Identify and eliminate TaskModel Thread

Posted by GitBox <gi...@apache.org>.
kaisun2000 commented on pull request #1213:
URL: https://github.com/apache/helix/pull/1213#issuecomment-670200850


   > I can help to merge once the test results are post : ) @kaisun2000
   
   The test result posted. Mostly passed. Failed one can pass by running individually.


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

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