When archiving for a site begins, we create a Lock and only release when archiving finishes or fails.
The lock's expire time is updated on each query (the TTL can be configured via DI).
There is also a change to log each archiving query (previously this was just in LogAggregator, but now it will affect all archivers).
I think we should deploy this to demo and see if it works after a day or two (after getting tests to pass of course).
Note: with this implementation it's possible for archiving to start while an invalidation is occurring, which would cause issues. I'm not sure how big of a risk it is since the invalidation queries are fairly simple. There could be a few of them though.
I'll add this to demo soon
@tsteur added back old functions and added a test for the Loader method that uses them
@diosmosis do you know of any issue on the demo? Maybe we could merge and release a new beta?
The metrics for the last two week seem accurate, I'm not aware of any issues (though I don't get emails if demo2 has an issue).