I have a problem with temporary files not being deleted despite setting keepTemporariesH
to 0
. I did not use this option before, so my understanding may be wrong, but I suppose that setting to 0
should disable keeping temporaries altogether. Is this correct?
Basically, the situation is as follows. Device A pushes some large files to Device B. While the files are still being uploaded, they get deleted/moved on Device A, which results in aborting the transfer. However, the ~syncthing~
temporary files created in the process have not been deleted.
I have tried to filter the log for relevant entries.
2021-02-07 19:48:10 Puller (folder "XXX" (gdwva-7bfwn), item "file1"): syncing: pull: no such file
2021-02-07 19:48:10 "XXX" (gdwva-7bfwn): Failed to sync 1 items
2021-02-07 19:48:10 Folder "XXX" (gdwva-7bfwn) isn't making sync progress - retrying in 1m36s.
2021-02-07 19:58:28 Puller (folder "XXX" (gdwva-7bfwn), item "file2"): syncing: pull: no such file
2021-02-07 19:58:28 "XXX" (gdwva-7bfwn): Failed to sync 1 items
2021-02-07 19:58:28 Folder "XXX" (gdwva-7bfwn) isn't making sync progress - retrying in 1m15s.
2021-02-07 19:58:32 Puller (folder "XXX" (gdwva-7bfwn), item "file2"): syncing: pull: no such file
2021-02-07 19:58:32 "XXX" (gdwva-7bfwn): Failed to sync 1 items
2021-02-07 19:58:32 Folder "XXX" (gdwva-7bfwn) isn't making sync progress - retrying in 1m4s.
2021-02-07 20:14:56 Puller (folder "XXX" (gdwva-7bfwn), item "file3"): syncing: no connected device has the required version of this file
2021-02-07 20:14:56 "XXX" (gdwva-7bfwn): Failed to sync 1 items
2021-02-07 20:14:56 Folder "XXX" (gdwva-7bfwn) isn't making sync progress - retrying in 3m5s.
Right now, it has been 12+ hours since then, and the folders themselves are 100% “Up to Date” with no issues, but the temporaries are still there with no idea when they are actually going to be deleted.
Edit: I have forced a manual re-scan, and the files are gone. This would indicate that deleting temporaries is tied to the periodic scan. Am I right? The folders are set to scan every 1 day, so this would make sense, although a potential problem could be that if periodic scanning was disabled completely, temporaries might stay untouched for a very long time, i.e. until the next restart/upgrade.
Basically, the problem that I want to solve here is that the non-tech-savvy user gets confused by visible temporary files. Because of that, I would like to either hide them, or force them to be deleted immediately on a failed download. If they are deleted only on scanning, then I would probably need to either set the scan interval to something extremely low (which is not the best solution, as we are using slow HDDs here), or maybe to use the Task Scheduler to hide/delete them periodically in addition to Syncthing.
In my personal builds, I have actually tried to modify the code, so that temporaries stay hidden even after a failure, but in this case I strongly prefer to keep using the official Syncthing binaries.