syncflux icon indicating copy to clipboard operation
syncflux copied to clipboard

initial replication works but hamonitor doesn't sync after that

Open vtacquet opened this issue 4 years ago • 4 comments

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 ?

vtacquet avatar Aug 11 '20 14:08 vtacquet

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.

toni-moreno avatar Sep 04 '20 14:09 toni-moreno

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?

mgf909 avatar Sep 17 '20 04:09 mgf909

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

toni-moreno avatar Sep 17 '20 05:09 toni-moreno

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

mgf909 avatar Sep 18 '20 06:09 mgf909