Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035005Retail ModulesStoreServerpublic2017-01-19 09:102017-01-27 23:12
AugustoMauch 
AugustoMauch 
normalminorhave not tried
closedfixed 
5
 
 
mtaal
No
0035005: Support SymmetricDS clustering
SymmetricDS has cluster support (see [1]), but to enable it the following properties must be set:
- cluster.lock.enabled: must be set to true to enable cluster support
- cluster.server.id: must have a different value for each cluster instance. It will be used to identify whawt cluster instance has the lock on each SymmetricDS Job

[1] http://www.symmetricds.org/doc/3.8/html/user-guide.html#_clustering [^]
-
No tags attached.
Issue History
2017-01-19 09:10AugustoMauchNew Issue
2017-01-19 09:10AugustoMauchAssigned To => AugustoMauch
2017-01-19 09:10AugustoMauchTriggers an Emergency Pack => No
2017-01-19 09:11AugustoMauchReview Assigned To => mtaal
2017-01-19 09:11AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=14328#r14328
2017-01-19 09:31hgbotCheckin
2017-01-19 09:31hgbotNote Added: 0093721
2017-01-19 09:31hgbotStatusnew => resolved
2017-01-19 09:31hgbotResolutionopen => fixed
2017-01-19 09:31hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/42257421eee7d36d69265a9daa94854b483a2b01 [^]
2017-01-19 09:34AugustoMauchNote Added: 0093722
2017-01-19 09:34AugustoMauchNote Edited: 0093722bug_revision_view_page.php?bugnote_id=0093722#r14330
2017-01-27 23:11mtaalNote Added: 0093902
2017-01-27 23:12mtaalNote Added: 0093903
2017-01-27 23:12mtaalStatusresolved => closed

Notes
(0093721)
hgbot   
2017-01-19 09:31   
Repository: erp/pmods/org.openbravo.replication.symmetricds
Changeset: 42257421eee7d36d69265a9daa94854b483a2b01
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jan 19 09:30:07 2017 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.replication.symmetricds/rev/42257421eee7d36d69265a9daa94854b483a2b01 [^]

Fixes issue 35005: Enables cluster support to SymmetricDS

To enable ethe SymmetricDS support, two properties must be provided to the SymmetricDS engine:
- cluster.lock.enabled: must be set to true to enable cluster support
- cluster.server.id: must have a different value for each cluster instance. It will be used to identify whawt cluster instance has the lock on each SymmetricDS Job

These properties will be automatically set if the hostname of the server (available from Java with System.getProperty("machine.name")) is defined. As described here [1], there are three ways to define the hostname:
- Starting from 3.0PR16Q3 it is possible to define the absolute path for this file by setting a JVM property named properties.path.
- Adding to the Tomcat's JVM a system property named machine.name which value is the hostName.
- If previous property is not set, it is taken from local host name. This name can be checked by executing ant host.name task in each node.

Note that if the cluster.lock.enabled and cluster.server.id properties are defined in a non-clustered environment, there will not be any negative repercusion and SymmetricDS will work as usual.

[1] http://wiki.openbravo.com/wiki/Openbravo.properties#Overriding_properties_per_instance [^]

---
M src/org/openbravo/replication/symmetricds/process/CreateEnginePropertiesComponent.java
M src/org/openbravo/replication/symmetricds/templates/engine-properties.ftl
---
(0093722)
AugustoMauch   
2017-01-19 09:34   
You can read here [1] how the tests were performed.

Also, here you can see two examples about how SymmetricDS clustering works.

[1] https://docs.google.com/document/d/1d4xmx-u8BLSY6nb-0rUmEXYlu2bvagWJxUh89rU4W_E/edit#heading=h.9lisufsygb27 [^]
[2] https://docs.google.com/presentation/d/1lnmkApHPopgE_rZc6dokAQOvJoYFJcmz4zYkG-Rbrnw/edit#slide=id.g1a33b79bb0_0_334 [^]

(0093902)
mtaal   
2017-01-27 23:11   
Added documentation:
http://wiki.openbravo.com/wiki/How_to_Set_Up_and_Start_the_Synchronization_Engine#Symmetric_DS_Clustering [^]
(0093903)
mtaal   
2017-01-27 23:12   
Reviewed, tested that by setting machine.name the sym-ds properties are correctly set and that replication works.