GitHub user aledsage opened a pull request:

    https://github.com/apache/brooklyn-server/pull/902

    BROOKLYN-545: Fix DynamicCluster.zoneFailureDetector default val

    Fixes https://issues.apache.org/jira/browse/BROOKLYN-545
    
    Below is an extract from the comments in the code, explaining it - see 
other code comments for more info:
    ```
        // Previously, when there was a mutable default value for 
ZONE_FAILURE_DETECTOR, the second cluster
        // would include failure info for the first cluster's zone-locations. 
When these were unmanaged,
        // the zone-locations would become dangling referenes within the 
ZoneFailureDetector. This caused
        // NPE on rebind.
        //
        // Config key persistence was then changed so that statically defined 
keys (such as ZONE_FAILURE_DETECTOR,
        // declared on the DynamicCluster class) would not be persisted. This 
meant that the ZoneFailureDetector
        // state was no longer persisted for either location. The NPE on rebind 
went away, but the config key
        // default value instance was still shared between all clusters.
        //
        // Now the detector has a null default value. We implicitly set a 
transient field for the zoneFailureDetector
        // so if using defaults then nothing is persisted. But if a custom 
ZoneFailureDetector is supplied, then
        // that will be persisted and used.
    ```

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

    $ git pull https://github.com/aledsage/brooklyn-server 
fix-DynamicCluster-zoneFailureDetector-default

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

    https://github.com/apache/brooklyn-server/pull/902.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 #902
    
----
commit 76ab91489d04cac693399d1b9a1ba1bbb53fa1ae
Author: Aled Sage <[email protected]>
Date:   2017-10-20T16:29:06Z

    BROOKLYN-545: Fix DynamicCluster.zoneFailureDetector default val

----


---

Reply via email to