[GitHub] activemq-artemis pull request #1204: ARTEMIS-1112: don't block live activati...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    I'm not convinced that start() should be non-blocking, but it seems to me that stop() should and that it should interrupt whatever is happening so the broker actually stops. Fixing this would ostensibly provide the functionality @bgutjahr is looking for. What do you think, @clebertsuconic?


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    In the meantime, I have found a way to get what I want without changing Artemis code. Not very nice, but seems to work: when I start a slave server, it automatically becomes live when there is not live running. There is only one exception: on first startup when no live has even been started, the slave waits for a live server to start before going into backup mode. But in that case, the is no bindings directory. So my solution is to check for the existance of a bindings directory and start a master server if it is missing. It becomes live and creates the bindings directory. From then on, I always start slave servers.
   
    This means I won't need an Artemis enhancement. Personally, I would prefer that the start() method doesn't block infinitely. I.e. start of a master server should return even if the master becomes a backup; and start of a slave server should also become live even if no live server has even run before. Even throwing an exception instead instead of blocking would be better in my opinion).
    But since than behavior can't be changed due without breaking backwards compatibility, I'll just use my own solution and check for the bindings directory.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    To be clear, the issue isn't one of "backwards compatibility." The issue is that there are tests which rely specifically on the blocking behavior. Therefore, if you change the blocking behavior (i.e. remove it) then you can address it one of several ways...
   
    - change the tests so they don't rely on start() blocking and pass when start() is non-blocking
    - allow start() to block so the tests still pass and introduce a way to make start() non-blocking via configuration (which is what you suggested earlier)
    - change some other behavior to get the functionality you're looking for (which is what I suggested in regards to making stop() non-blocking)
   
    If you're satisfied with your current solution (i.e. checking the bindings directory) that's fine, but it's worth noting that this could change (but probably won't) at any time. In other words, you're relying on something that is not guaranteed.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    If possible, I would like to retry my fix and adapt the failing tests. But I'm not sure if I can achieve that. Thi morning I have checked out the latest master version and started test execution (mvn -Ptests test) to check that the tests are good before I make any changes. But there are already some failing tests (so far ~100 failures, tests still running). So it would be impossible for me to tell which tests failed in addition due to my changes. I wonder if this is because I'm building on Windows with Cygwin?
   
    Without getting good test results, it doesn't make sense for me to make any changes. So I guess I'll stick with my current solution - at least for now. I know its relying on something that might change, but I can deal with it when happens.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    @bgutjahr just add an option... allowFailback=(default) true. set allowFailback to false and have the same behaviour you had. I would be happy with that.
   
    @jbertram the issue is not really about blocking.. is having a pool of backups and something that will allow live to become backup if there's a live server.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    OK, I'll try to add such an 'allowFailback' option. But I want to avoid breaking something else. How can I be sure if the tests fail already on my system without any changes.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    mvn test -Ptests
   
   
    but if you push to a branch, I can run it on my local server and tell you how it went.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    I'm not fully convinced that allowFailback is the right name. AllowFailback=false sounds to me as if failback shall be denied - which doesn't make sense. What about waitForFailback (default true) instead?
   
    I'm using mvn test -Ptests, but got plenty of failures (using Cygwin on Windows, maybe I should build on Linux?)


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    @bgutjahr pick a good name then :) you got the idea... add a property to keep the current semantic...


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|

[GitHub] activemq-artemis issue #1204: ARTEMIS-1112: don't block live activation if a...

clebertsuconic-3
In reply to this post by clebertsuconic-3
Github user clebertsuconic commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    i use mac and linux.. I haven't run the test on windows for some time.


---
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 [hidden email] or file a JIRA ticket
with INFRA.
---
12