maxpert / marmot

A distributed SQLite replicator built on top of NATS
https://maxpert.github.io/marmot/
MIT License
1.7k stars 42 forks source link

polling doesnt start until a change is detected #49

Closed disarticulate closed 1 year ago

disarticulate commented 1 year ago

I setup polling due to inability to detect changes (running inside docker; probably can fix this).

With two marmot services, one leader and one follower. Polling (scan_changes) only starts after an insert/update is performed

Expected behavior: polling/scan_changes should start on bootup

maxpert commented 1 year ago

Is the intention to propagate changes in the DB that were made while Marmot was not running? If yes then Marmot already does picks up and propagates changes at boot time.

disarticulate commented 1 year ago

I'm not seeing changes propagate on start up configuring the S3 system. Do both clients need to have separate snapshot locations? That's the only thing I can think of in the configuration. Right now, all I've observed are transmitted updates when two clients are connected. It does not appear that either client fetches a snapshot.

maxpert commented 1 year ago

No both clients need to point to same snapshot location. When Marmot boots up it looks at the sequence file to check if it's too behind in change log for sequence. If that file is missing, all sequences should be assumed 0. Try changing change log size to lower value to reproduce it.