-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Current situtation
A fresh reprovide cycle starts as soon as the SweepingProvider
is created.
This means that if the node has been providing (and reproviding) content, then is turned off (not just offline) for a few hours/days, and then is restarted, it will take up to reprovideInterval
for all keys to be reprovided.
Ideal situation
We want a similar behaviour to when the provide
goes offline
, which is to keep track of regions that should have been reprovided but weren't because the node was offline, and reprovide them as fast as possible when the provider
comes back online.
We need to write reprovide timestamps to a datastore, so that when the SweepingProvider
is started it can look in the datastore for regions that haven't been provided since at least reprovideInterval
and schedule them to be reprovided ASAP.