kaisun2000 commented on a change in pull request #1218:
URL: https://github.com/apache/helix/pull/1218#discussion_r467232130



##########
File path: 
helix-core/src/test/java/org/apache/helix/integration/task/TestNoDoubleAssign.java
##########
@@ -155,11 +155,16 @@ private void pollForDoubleAssign() {
    * Randomly causes Participants to lost connection temporarily.
    */
   private void breakConnection() {
+    // Note, send to THREAD_COUNT == 1 is a must to avoid leaking 
ClusterManager (participant).

Review comment:
       Sure. Let me explain:
   
   Assume we have two thread A, B. Both of them choose slot 0. The sequence of 
action is 
   
   A stop 0
   B stop 0
   A start 0
   B start 0
   
   Now _participants[0] hold the reference of clutermanager started by B.  
clustermanager started by A is not referenced by any one any more. They are 
leaked. 




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to