Quantcast

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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

asfgit
GitHub user bgutjahr opened a pull request:

    https://github.com/apache/activemq-artemis/pull/1204

    ARTEMIS-1112: don't block live activation if another live server is running

    Instead of going directly into backup mode within the shared-store
    live activation, we just change the HA-policy to slave and return
    to the caller - ActiveMQServerImpl.internalStart().
    The caller will then handle the backup activation as usual
    in a separate thread, such that EmbeddedJMS.start() can return.
    
    modified:   artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java

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

    $ git pull https://github.com/bgutjahr/activemq-artemis master-as-backup

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

    https://github.com/apache/activemq-artemis/pull/1204.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 #1204
   
----
commit b3e39e3c2038de9c94251525a21f216d82cd0958
Author: Bernd Gutjahr <[hidden email]>
Date:   2017-04-13T13:01:36Z

    ARTEMIS-1112: don't block live activation if another live server is running
   
    Instead of going directly into backup mode within the shared-store
    live activation, we just change the HA-policy to slave and return
    to the caller - ActiveMQServerImpl.internalStart().
    The caller will then handle the backup activation as usual
    in a separate thread, such that EmbeddedJMS.start() can return.
    
    modified:   artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedStoreLiveActivation.java

----


---
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
|  
Report Content as Inappropriate

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

asfgit
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    Can you add a test to your commit?


---
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
|  
Report Content as Inappropriate

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

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

    https://github.com/apache/activemq-artemis/pull/1204
 
    also, this kind of thing it first needs a master, then a cherrypick into 1.x
   
   
    or if you exceptionally fixed into 1.x for a good reason, then you need to push the change on master.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    OK, I'll push my change on master. The reason why I did it for 1.x is that we have a product which is currently using 1.5.4 and we did not yet plan to switch 2.0 so far. I have not even started to look into what implications a switch to 2.0 would have for us.
   
    I can try to write a test. Can someone give me some hints, e.g. where to put it, what other test I could use as a model?


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    For an example of how the test might look take a peek at org.apache.activemq.artemis.tests.integration.SimpleTest or org.apache.activemq.artemis.tests.integration.cluster.failover.SharedStoreBackupTest. You can put the resulting test in org.apache.activemq.artemis.tests.integration.cluster.failover.


---
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
|  
Report Content as Inappropriate

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

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

    https://github.com/apache/activemq-artemis/pull/1204
 
    You may use smokeTests as well. we only have one now but we can expand.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    I have added an integration test. Jenkins build failed, but I don't see why.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/1204


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    Would it be possible to cherrypick this fix also into 1.x?


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    Sure, go for it.


---
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
|  
Report Content as Inappropriate

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

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

    https://github.com/apache/activemq-artemis/pull/1204
 
    @jbertram can you check the testsuite. I think it got broken after this.


---
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
|  
Report Content as Inappropriate

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

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

    https://github.com/apache/activemq-artemis/pull/1204
 
    @jbertram / @bgutjahr this added about 20 failures to the testsuite...
   
   
    Example: org.apache.activemq.artemis.tests.integration.cluster.failover.FailBackAutoTes
   
   
   
    I'm back from my PTO on monday.. let me know by then if this will be fixed or reverted :)


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    I'm going to have to revert this as it's breaking a handful of tests in the test-suite which rely on the semantic  which was changed.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    So what's your suggestion? Is it OK to change the semantics and should I adapt the failing test cases?
   
    Or is this rather a new feature? I could either add new option to SharedStoreMasterPolicyConfiguration and related config files (but I don't have a good name for that option), or a new SharedStorePolicyConfiguration class with the new semantics of: become master if no master is running, otherwise become backup. No failback, always failover on server shutdown (since all servers are treated equal, none of them is a dedicated master).
   
    Thinking about this, my personal favorite would be the new policy class and leaving the existing semantics unchanged. I could go for that, if you agree.
   
    What we actually want it this: run the artemis bus on two servers with a started store. Whichever is started first shall become master, the other backup. But we need to have the start method return in any case, to know that startup is completed.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user jbertram commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    Thinking about this more...I'm now not convinced that any changes to Artemis need to be made to support the functionality you're looking for. I believe you could start Artemis in a new thread if you like from your application, and you can use things like ActiveMQServer.registerActivationFailureListener or ActiveMQServer.isActive to stay informed about the status of the broker. Let me know what you think.


---
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
|  
Report Content as Inappropriate

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

asfgit
In reply to this post by asfgit
Github user bgutjahr commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1204
 
    I had also thought about putting the start call into thread. But that would lead to a lifecyclt issue. Since EmbeddedServer start() and stop() methods are synchronized, I won't be able to stop a backup server before it became live.
   
    I have started looking a bit more into Artemis code. So far I have just added an option to the shared-store master configuration, prelimilarily named 'allow-as-backup'. This approach appeared a (little) bit easier than adding a new policy class.


---
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
|  
Report Content as Inappropriate

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

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

    https://github.com/apache/activemq-artemis/pull/1204
 
    A new method preserving the old semantics ?


---
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.
---
Loading...