GitHub user ahgittin opened a pull request:

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

    Removes `FIRST` sensors on children

    They were buggy and could deadlock -- and I think fundamentally flawed (as 
comments there suggested).
    
    @grkvlt I think you added these; can you check that the workarounds 
suggested in the last commit is sufficient?
    
    There are a few other minor tidies also.

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

    $ git pull https://github.com/ahgittin/brooklyn-server primary-and-tidies

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

    https://github.com/apache/brooklyn-server/pull/777.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 #777
    
----
commit 4d824127a31b56a411c29a7c4f941471ea436eed
Author: Alex Heneveld <[email protected]>
Date:   2017-07-24T15:49:58Z

    allow simple constant quora to be set as a constant (no need for complex 
range)

commit 14565cd13e74082f8e6494deff40683d51b5978e
Author: Alex Heneveld <[email protected]>
Date:   2017-07-24T15:50:29Z

    display nicer message when required child/quorum not healthy

commit b2251f48c46cdf88d375f8a593990f2edf860011
Author: Alex Heneveld <[email protected]>
Date:   2017-07-24T15:51:53Z

    fix errors with DynamicMultiGroup
    
    minor things:
    * javadoc
    * quorum checks should only look at children (the buckets); the members are 
observed by the children
    * if there is a problem, fail more gracefully (otherwise it risks adding 
nodes ad infinitum)

commit e8d25ca95a43af52c0c8a97e2da1c707f9d7fa68
Author: Alex Heneveld <[email protected]>
Date:   2017-07-24T16:01:51Z

    remove FIRST_MEMBER sensor, it doesn't work, and deprecate FIRST
    
    both are a bit flaky, but FIRST_MEMBER especially so:
    it would never get cleared, and it could cause deadlock
    (as parent attempts to update child's sensor while holding members lock,
    meanwhile child might publish a sensor which causes parent subscriber to 
try to getMembers).
    
    additionally we no longer set FIRST=(other entity) on the child, for the 
same reasons,
    but also it causes conflict if the child is also a group (so FIRST might be 
the parent's FIRST
    or its own FIRST).
    
    the new "primary" model is a much better one to use instead when you need 
notification
    of something being promoted, or an enricher if you need the parent's first 
injected locally
    (but you should always be able to say 
`$brooklyn:parent().attributeWhenReady("first"))`)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to