toni-moreno / syncflux

SyncFlux is an Open Source InfluxDB Data synchronization and replication tool for migration purposes or HA clusters
MIT License
154 stars 34 forks source link

initial replication works but hamonitor doesn't sync after that #41

Open vtacquet opened 4 years ago

vtacquet commented 4 years ago

after the initial replication "hamonitor" just does a cluster check and doesn't copy data anymore (there is no error) hamonitor

when I start a syncflux with "copy" action manually (while hamonitor is running in the background), the data (after the initial replication) gets synced again, but since this is manual I have to do this every time copy

shouldn't that sync be done by hamonitor process ?

toni-moreno commented 4 years ago

Hello @vtacquet sorry by the very big delayed answer.

The hamonitor process presupposes the cluster already synced and it detects when the slave is down , take note about the period in downtime and sync once the slave has recovered. But it needs to know in starting time that data is synced.

If not you need to sync data playing syncflux manually as you did.

mgf909 commented 4 years ago

I also have this issue. If the databases are not in sync the -hamonitor will bring them back into sync, but not keep them synced...no updates into the master are transferred to the slave. image

from this point the slave never gets any updates...

@toni-moreno I see your comment above... cant hamonitor on detecting that the slave is available again, trigger a resync?

toni-moreno commented 4 years ago

@mgf909 hamonitor mode trigger resync just after the slave have been recovered and only for the period of time while slave was down. In the meanwhile you need influxdb-srelay behind 2 nodes sending replicated data to both nodes.

mgf909 commented 4 years ago

@toni-moreno -Ok i see. My use case is a little bit different i guess to how this was designed. My slave is running on a boat computer ( logging engine/navigation metrics ) and once back at the marina, i want it to reconnect to the master and send all updates. I dont really want to have to setup the srelay components.

I guess i can just periodically do a - "copy" from the slave to the master... -HAMonitor was just so close to being perfect as it continues to run in a loop.