When sync error, How long will remove or keep the temp file ".syncthing.xxx ?

Thanks for develop this project and it’s a very good sync tool !

I have a question … please take a time to give a help !

I have some nodes, EX: A(Master) -> B

if xxx need sync from A to B, but got some trouble (EX: A->B has disconnected, but syncthing service still work),

How long will remove or keep the temp file ".syncthing.xxx ?

Thank you very much Best Regards,

TonTon

24 hours but you will need to restart Syncthing for that to happen, as cleanup happens on start. You can change this value to 0 if you want, but you will still need a restart.

We reuse the temporary file next time the node comes back up.

Also, once the node comes back, if the temporary file is not reusable, it will get deleted and replaced with a new file while the transfer is in progress.

Thanks for your quickly response !!!

Could you please tell me how to change the default value " 24 " hours ?

Thanks for your help !

TonTon

It’s in config.xml in your Syncthing’s home directory (which I think is displayed where it is when you do syncthing --help)

Thank you very much !!!

TonTon

We could equally well clean these as part of our scans, what do you think?

Thanks for taking the time to open the issue !!!

Also, I have tried to modified the config file 1 (v0.10.1)

In such circumstance, when I stop syncthing, the temp file " .syncthing.xxx.iso " will delete, it will not keep and wait 1 hour !!!

If I have need to modified any configuration, please take a time to give a help !

@ideex2, can you make sure the mtime of the file is not behind by more than 1 hour?

YES ! I am sure !

This because when I stop the syncthing of A server, I also check the .syncthing.xxx.iso (b server) has removed at the same time !

I have tried 5 times to check the temp file state, and print screen as attachment file:

Thank you very much !!!

Sorry, perhaps I am misunderstanding your problem, let me explain in more details how it works, and you can tell me if the problem still exists.

The fact of whether A is connected to B doesn’t matter at all.

So Syncthing cleans up temp files ONLY on boot. If you start syncthing, start downloading from B, then break connection to B without finishing download and wait 1 hour - the file will not get deleted. It will only get deleted after you restart syncthing, as it checks mtime on restart.

This will be fixed and in the future (the issue I opened) it will cleanup temp files as it scans, which means you will no longer need to restart for the cleanup to happen, and your 1 hour cleanup period will be respected, but this does not happen now.

Sorry ! Maybe I haven’t describe detail my problem, I only check the temp file keep mechanism !!!

my configuration is keepTemporariesH 1 keepTemporariesH

However, on my test situation: when I stop A server (only stop no restart) that will make B client (keep start no restart) download xxx.iso from A interrupt and also remvoe .syncthing.xxx.iso " at the same time (It must keep the .syncthing.xxx.iso for 1 hours ? ) " …is it the situation right ?

Thanks for your replay ! Thank you very much !!!

PS: I have tried again, when I modified the keepTemporariesH as 1, 2, 3, … 20, 23 ( I have restart service)… when I stop service to interrupt the downloading, It will removed the .syncthing.xxx.iso at the same time !!!

Interesting, I will look into this and see if I can reproduce it.

Logged as:

  1. Well, I wonder what will happen if you are transferring a very large file and the connection breaks or r/o node goes away and than comes back at some time in the future? Would not it make it impossible to transfer very large files on flaky connections, which I see quite often with BTSync nodes?

  2. What if you just create the “Manual cleanup” or “Remove all temp files” option for the share, which would act without restart and would just show the popup dialog that asks “Are you sure you want to remove all temp files NOW?”

  3. Actually, I recall you have said that you had an issue with transferring very large files. Is it resolved now? If not, could you please explain exactly what the problem is?

I have now proposed a fix for the above problem. The functionality was actually broken if the remote node has gone away, rather than you yourself.

This will get fixed once the pull request gets accepted.

There is no need for a manual option as it will respect the option set in the config.

Hello !!! Is it fix this problem ?

I have update the ner version 0.10.2, however if I stop the A’s(Master) syncthine service, that B still get the same problem (auto delete the syncthing.xxxxx.iso…

Thank you !

Hello !!! Is it fix this problem ?

I have update the ner version 0.10.2, however if I stop the A’s(Master) syncthine service, that B still get the same problem (auto delete the syncthing.xxxxx.iso…

Thank you !

Reopened https://github.com/syncthing/syncthing/issues/849 Will investigate once I have more time.

Dear Sir !

I have upgrade to 0.10.5 … and setup the keepTemporariesH as 1.

I try sync a file (xxx.iso) and stop it, show as follow: -rw-r–r-- 1 root root 190M 2014-11-04 20:51 .syncthing.xxx.iso

Could you please tell me, keepTemporariesH as 1 which mean if I start syncthing before 2014-11-04 21:51 it will continue sync and if after 2014-11-04 21:51, the temp file will be delete ?

Many thanks for your swift attention to this matter. For more information you may need, please do not hesitate to inform me.

Best regards.

TonTon

Yes and no. keepTemporariesH means at least 1 hour, but it could take up to 2 hours since the check is run only once an hour, so it might take up to another hour to discover the fact that it is now past the 1 hour allowance, if that makes sense.

So in your example: If you restart before 2014-11-04 21:51, the temp file WILL definitely be there and WILL allow reuse. If you restart between 2014-11-04 21:51 and 2014-11-04 22:51, the temp file MIGHT still be there which might allow reuse. If you restart after 2014-11-04 22:51 the temp file WILL NOT be there and WILL NOT allow reuse.