locked
How to clean BatchSpoolDirectory after successfull sync? RRS feed

  • Question

  • Hi,

    We're using the batching feature of SyncService and we discovered that a lot of files are created in the temp folder during the initial sync (more than 300Mb to download).

    The problem is that those files aren't deleted, even after a successful transaction. So we were wondering how/when should we clean-up this temp folder? How can we make the correlation between some temp files and a specific sync?

    Thanks,

    Stéphane.


    Live as if you were to die tomorrow. Learn as if you were to live forever.

    Monday, January 14, 2013 7:25 PM

Answers

  • you should time the clean up to accommodate the longest sync session you have. if the longest, single sync session you have is a day, then it's safe to assume you can delete the files the day after.

    the files will be regenerated if they're not found, so even if you accidentally delete a file, that will only fail the sync and if you retry, it will just generate new batch files for the sync.

    the batch files are just temporary files used for transmitting the changes in chunks. change selection is always done against the database, not with the batch files...

    Tuesday, January 15, 2013 11:14 AM

All replies

  • in the past, I some clean up code to delete temp files older than a day... once  a sync session is over, those files can be safely deleted...

    Tuesday, January 15, 2013 6:26 AM
  • Hi JuneT,

    It means that "pending" sync cannot take longer than one day?

    If our client lost his network during a sync, he must redo one the same day otherwise files will be deleted, isn't it?

    Thank,

    Stéphane.


    Live as if you were to die tomorrow. Learn as if you were to live forever.

    Tuesday, January 15, 2013 7:28 AM
  • you should time the clean up to accommodate the longest sync session you have. if the longest, single sync session you have is a day, then it's safe to assume you can delete the files the day after.

    the files will be regenerated if they're not found, so even if you accidentally delete a file, that will only fail the sync and if you retry, it will just generate new batch files for the sync.

    the batch files are just temporary files used for transmitting the changes in chunks. change selection is always done against the database, not with the batch files...

    Tuesday, January 15, 2013 11:14 AM