EarthScope / ringserver

Apache License 2.0
30 stars 16 forks source link

dali2dali, go to earliest if state file reconnect fails #43

Closed crotwell closed 8 months ago

crotwell commented 1 year ago

This probably should be an issue on dali2dali, but putting here since no repo yet...

I have a ringserver running as effectively a data cache. So a small computer runs at a station and data goes from logger to local ringserver. Then dali2dali on my central server pulls data to the central ringserver. For most network outages dali2dali is able to recover via the state file and catch up. However, occasionally the outage is longer than the relatively small size of the local ringserver. In this case dali2dali says it can't recover via the state file as that last datalink packet no longer exists. That makes sense, but then it restarts the data flow starting from "now", meaning is creates a larger data gap than exists as there is some older data in the remote ringserver.

Perhaps in many cases that is the right answer, but for my use I would like to configure dal2dali to restart the flow from "earliest" in the case that recovery via the state file fails to minimize data gaps.

A related use case would simple be initial starting up dali2dali with no state file to pull from a remote ringserver to get all older data as well as new data as it arrives.

Would adding something like a --earliest flag be possible? Or perhaps allow dali2dali to restart the flow at the date given in the statefile even if the packet id is no longer in the ring?

crotwell commented 8 months ago

moved to https://github.com/EarthScope/dali2dali/issues/1