GitHub user narendly opened a pull request:

    https://github.com/apache/helix/pull/251

    Make AssignmentCalculators non-static so that tests pass

    With the introduction of quota-based scheduling, every task that gets 
scheduled takes up a thread. However, previously these AssignmentCalculators 
(both generic and fixed for generic jobs and targeted jobs) were stateless so 
they were instantiated statically. Since AssignmentCalculators now are stateful 
due to them operating on AssignableInstances' quota profile, they were made 
non-static so that they would be re-instantiated every pipeline.
    
    This problem is specific to the testing environment where static variables 
live on from test to test, causing AssignmentCalculators to hold on to the very 
first reference to AssignableInstanceManager. Tasks were not being assigned and 
scheduled because the first set of AssignableInstances would get filled up and 
never get freed.
    
    Changelist:
    1. Make AssignmentCalculators non-static
    2. Adjust sleep duration for some tests for stability

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/narendly/helix 1350712

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/helix/pull/251.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #251
    
----
commit 3434127c7c215558a886f160b00751bc2ecb4061
Author: Hunter Lee <narendly@...>
Date:   2018-07-16T22:48:38Z

    [HELIX-735] Make AssignmentCalculators non-static so that tests pass
    
    With the introduction of quota-based scheduling, every task that gets 
scheduled takes up a thread. However, previously these AssignmentCalculators 
(both generic and fixed for generic jobs and targeted jobs) were stateless so 
they were instantiated statically. Since AssignmentCalculators now are stateful 
due to them operating on AssignableInstances' quota profile, they were made 
non-static so that they would be re-instantiated every pipeline.
    
    This problem is specific to the testing environment where static variables 
live on from test to test, causing AssignmentCalculators to hold on to the very 
first reference to AssignableInstanceManager. Tasks were not being assigned and 
scheduled because the first set of AssignableInstances would get filled up and 
never get freed.
    
    Changelist:
    1. Make AssignmentCalculators non-static
    2. Adjust sleep duration for some tests for stability

----


---

Reply via email to