[ 
https://issues.apache.org/jira/browse/ARTEMIS-2165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16867097#comment-16867097
 ] 

Dan Langford commented on ARTEMIS-2165:
---------------------------------------

FWIW we are experiencing similar issues. A test case was written for our 
problem. It didnt get much traction over in the mailing list but maybe it will 
prove useful to somebody over here. The test case is here: 
[https://github.com/SethPyle376/colocated-scaledown-problem/blob/master/src/main/java/org/apache/activemq/artemis/jms/example/ColocatedFailoverScaledownFailbackTest.java]

it shows that when a server in a colocated ha-policy is shut down and then 
restarted that server fails to (re-)obtain a backup on another server. it 
demonstrates that by producing a message, crashing the server, and showing that 
the messages didnt get backed up and scaled down... which is an opportunity for 
message loss. 

> Not having backup available after restart in colocated configuration
> --------------------------------------------------------------------
>
>                 Key: ARTEMIS-2165
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2165
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.6.0
>            Reporter: Dmitry Smeliansky
>            Priority: Major
>
> We use colocated HA-policy and trying to achieve the following:
>  # We have 2 servers and want each one of them will hold a) 1 master b) 1 
> slave for the master of each other
>  # When we start the servers we have the above as we wanted
>  # When one of the server is going down, the slave on the second becomes a 
> live master - till now everything is ok
>  # When the second server (which was down in step 3) is up, the slave from 
> server 1 remains a live master and a slave for master 1 is not created in 
> server 2.
> All we want is : how the system should be configured, so after the step 4 we 
> will have the exact topology as after the step 1.
>  # Start server 1 and server 2: server 1 has 1 master and 1 slave, server 2 
> has one master and one slave
>  # Restart server 2: server 1 has one master and one slave, server 2 has one 
> master and one slave
>  
>  
>  
> This issue was asked multiple times in stackoverflow, but was never answered.
> When using a co-located HA policy, the backups, maintained by some node are 
> not restored after this node is restarted (not on this node and not on any 
> other).
> [https://stackoverflow.com/questions/52839706/artemis-2-6-0-colocated-ha-issues]
> [https://stackoverflow.com/questions/52000662/artemis-colocated-ha-policy]
> Our configuration was as the following:
> {code:java}
>    <ha-policy>
>         <replication>
>               <colocated>
>                     <backup-port-offset>100</backup-port-offset>
>                     <request-backup>true</request-backup>
>                     <max-backups>2</max-backups>
>                     <backup-request-retries>-1</backup-request-retries>
>                     
> <backup-request-retry-interval>5000</backup-request-retry-interval>
>                     <master/>
>                     <slave/>
>               </colocated>
>         </replication>
>   </ha-policy>{code}
> Thanks



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to