The rc vfs/refresh seems to lock the directories being refreshed when this runs. Is there a possibility to not lock and still serve content while it runs even if the result set is just a non-cached version? Figured i’d ask here before opening an issue. There may be a technical reason this can’t be done.
Hmm… The root directory is locked for the entire refresh including fetching all the directories, but I think that is unnecessary.
Here is an experiment which fetches the new directories from the remote with the root unlocked then locks the root directory for a short time while it and the subdirectories are updated.
What do you think of that? It will be serving the original data while the refresh is going on. If a directory is being updated, I guess there is a chance that it will get out of sync.
fetch remote recursive directory listing
lock root directory
update directory cache
unlock root directory
So if while 1. is going on a directory gets updated after it has been fetched, then 3. will replace the updated directory listing with the old one. Not sure how big a problem this will be in practice…
That is definitely better as far as locking. Since depending on the size of the remote the refresh can take a while if doing the entire recursive remote, I think the risk of that out of sync is pretty minimal. The way it is before this beta, the entire remote is locked for the duration which isn’t good. Thank you Nick. Let me know if you think you can merge this otherwise i’ll stay on this beta till then.
You are probably right, since all that was locked was the root directory not the subdirectories, so potentially that problem could be happening already.
I’ve merged the above into the latest beta (it will be there in 15-30 mins!)