You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by aledsage <gi...@git.apache.org> on 2016/11/04 17:35:51 UTC
[GitHub] brooklyn-server pull request #406: Fix app.stop so doesn’t go on-fire brie...
GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/406
Fix app.stop so doesn\u2019t go on-fire briefly
Previously in app.stop, we set the serviceUp=false before setting
expectedState=stopping. This meant there was a race where we could
briefly infer the actual state as on_fire.
This caused failure of `SoftwareProcessEntityLatchTest.testStopLatchBlocks`:
the attributeWhenReady latch would abort because it received an
event saying that the app was on_fire, so the stop_latch completely
immediately.
The fix is simple: in app.stop, set the expectedSate=stopping before
setting serviceUp=false.
@neykov @geomacy you'll both be interested in this.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server fix-app-onFire-briefly-on-stop
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/406.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 #406
----
commit 0070c6b417963018bbb1e4a86d1cedd1f249fc22
Author: Aled Sage <al...@gmail.com>
Date: 2016-11-04T17:34:55Z
Fix app.stop so doesn\u2019t go on-fire briefly
Previously in app.stop, we set the serviceUp=false before setting
expectedState=stopping. This meant there was a race where we could
briefly infer the actual state as on_fire.
This caused failure of SoftwareProcessEntityLatchTest.testStopLatchBlocks:
the attributeWhenReady latch would abort because it received an
event saying that the app was on_fire, so the stop_latch completely
immediately.
The fix is simple: in app.stop, set the expectedSate=stopping before
setting serviceUp=false.
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request #406: Fix app.stop so doesn’t go on-fire brie...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/406
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #406: Fix app.stop so doesn’t go on-fire briefly
Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/406
\U0001f44d LGTM. The change makes sense according to the description above.
On the question of reproducing this, I wasn't able to reproduce the test failure prior with master at date of 26th October (34eab17). I caught up with master today and was able to get a couple of test failures by running 500 iterations of `testStopLatchBlocks`. It's possible that recent changes have affected the visibility of the race that @aledsage mentions above.
Having pulled and merged this PR, however, I was able to run 1000 iterations without any failures.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #406: Fix app.stop so doesn’t go on-fire briefly
Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the issue:
https://github.com/apache/brooklyn-server/pull/406
Thanks @geomacy - merging now.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---