I have another problem The inital load is not synced. If the server has some data in the tables, when the client connets this data is not synced. How can I achieve this? Only the configuration is synced now.
Thank you, this helped, I was following the tutorial, and there i couln't see that the source code is in different repo than mvnrepository
Both 'client' and 'server' type node needed the /sync url to be registered. @Bean public ServletRegistrationBean<SymmetricServlet> symServlet() { ServletRegistrationBean<SymmetricServlet> bean = new ServletRegistrationBean<>(new SymmetricServlet(), "/sync/*"); bean.setLoadOnStartup(1); return bean; }
The server is added to the database, when ServerSymmetricEngine starts. reversible I changed to 0, basically I can set it o 0 or 1, does not matter. The problem was that I needed to MANUALLY do the syncTriggers from code. The client created the triggers fine, but the 'server' type deployment not. serverEngine.syncTriggers(); But now I'm facing another issue. The Database is not copied with the after registration. The syncronization workds if i C/I/D rows, but if i insert a row into the database before...
Yes the value was there....i i do not know why but I needed to register the urls manually. The server node was inthe database, otherwise my script would fail because of constraints. @Bean public ServletRegistrationBean<SymmetricServlet> symServlet() { ServletRegistrationBean<SymmetricServlet> bean = new ServletRegistrationBean<>(new SymmetricServlet(), "/sync/*"); bean.setLoadOnStartup(1); return bean; }
No,the auto.reload=true was added to the config. I needed to manually trigger the syncTriggers. ServerSymmetricEngine serverEngine = new ServerSymmetricEngine(new File(url.getPath())); serverEngine.setDeploymentType("server"); serverEngine.setup(); serverEngine.start(); flyway.setLocations("classpath:scripts"); flyway.setValidateOnMigrate(false); flyway.migrate(); ** serverEngine.syncTriggers();**
Ihave spring boot app, what has an embedded symetricds server. When symetricserver start i insert some data to the database (for instance to sync all tables) After this insert SymmetricDs server does not refresh even if i set the autorefresh boolean. the config itself is good, because when the client registers it gets this config and creates the trigger tables. How can i make my server to actupon the changes and create? my main problem is that theae trigger tables are not generated.
Synconization only works from client to-> server , doesn't matter what is configured -- Node Groups insert into sym_node_group (node_group_id) values ('client'); -- Node Group Links -- server sends changes to client when client pulls from server insert into sym_node_group_link (source_node_group_id, target_node_group_id, data_event_action, is_reversible) values ('server', 'client', 'W', 1); -- client sends changes to server when client pushes to server insert into sym_node_group_link (source_node_group_id,...