The following happens sometimes: a directory and a file inside that directory are created and, I guess before those two get synced, the directory changes names. Then, ST gets stuck with the message that it is not making any progress and the log shows things like
17:08:49 INFO: Puller (folder "refs", file "A frame/framework-k12-science-education.pdf"): dst stat dir: stat /home/ramon/refs/A frame: no such file or directory
Directory “A frame” in fact no longer exists, because it was created, but then quickly renamed (to something else). But then, is there a way to tell ST to forget about that non-existing directory? I’ve tried to no avail to restart it, but that does not work (and the damage seems to have been done and propagated to other nodes). The only solution I’ve found is to actually create that directory and file, allow ST to sync them, and them delete the file and directory.
This is on Linux, with inotify enabled. I guess this can be prevented disabling inotify (so that syncing only happens after directory and file names are stable) but … that sort of defeats the purpose.
It should forget about the directory when the other node notifies us about it being deleted, which never seems to happen?
This should fix itself in a non-inotify world… Perhaps this is worth a testcase.
It is not easy to reproduce. I tried with several sleep intervals (and without sleep) in a sequence like
mkdir d11; touch d11/f2; sleep 1; mv d11 d12
but I cannot trigger the problem at will. It has happened to me several times, though (more details: this happens when I use Mendeley, a reference management program; when I give it a PDF, it creates a directory, which should be the name of the paper, and places the PDF inside, but the directory names is not always correct —if it could not get the title of the PDF right; so then I go and, from Mendeley itself, rename the directory. I guess somewhere in between ST has started syncing, only to find that the directory has vanished).
I seem to get this oe frequently on Android.
Atm I am flooded with these errors. I deleted folders, deleted the index folder, did not go away. I deleted the folder from the main node, did not go away. Not sure what to do. One folder with missing files is flooding the ST logs.
I wonder if this is yet some other manifestation of Android not updating mtimes when things change on disk… Although we should still detect that a file is no longer present…
On Linux at least, as a last resort to get unstuck I created the directory ST is stuck on, and
touched all the files it is complaining about. Let it sync. And then