Closed windoze closed 1 month ago
It's pretty hard to produce a real error, but I roughly looked at the code, and I found:
cargo
can resolve most problems.Given the situation I guess the fix won't be very straightforward, but otho the issue is not very significant either.
I'm thinking of combining the serving and syncing functions into one process, so they can talk to each other and lock/pause the other one when needed, it could be the simplest way.
Note that while the index update is a git pull and checkout, it only updates the master branch after the crates have been downloaded. This is because it uses the difference between origin/master
and master
to figure out which new crates to download.
If there are any race conditions beyond that, they're probably not very significant. At least, nothing that would cause corruption, or anything more than just redownloading dependencies a second time.
So to answer your question, yes, it should be safe to sync and serve at the same time - in fact, panamax is built with that use case in mind.
Is it safe to sync and serve at the same time?
I have a mirror fully-synced, but I'd like to update the mirror without stopping serving, is this a safe action?
Thanks, Chen