locked
Why LocalProvider does not clean BatchDirectory? RRS feed

Answers

  • if am not mistaken, its the provider that's applying the change that cleans up the directory. in an n-tier setup, the service side provider knows only about its own folder on the server side and not the client side.

     

    • Marked as answer by sb_angela Thursday, August 11, 2011 1:40 PM
    Thursday, August 11, 2011 8:29 AM

All replies

  • HI, I was looking at the code that you pointed to. I see that there's a clean up of the batching directory in the end session and as a part of cleanup that is called during dispose in the RelationalProxyProvider. Wondering why you expect a cleanup after upload?

    Thanks. 

    Thursday, August 11, 2011 2:59 AM
  • During an upload sync session (clients sends changes to the server), the batch files are spooled on local provides batch directory. From this directory they are uploaded (by the proxy) to the server batch directory.

    After sync ends, only the server batch directory is cleaned. I want this folder to be empty, sync succeeded so no need to keep them anymore.

    The RelationalProxyProvider only cleans the directory during a download session (when it downloads the batch files from server to client).


    sb_angela
    Thursday, August 11, 2011 7:10 AM
  • can you enable sync framework tracing to confirm if its even attempting to clean up the directory?
    Thursday, August 11, 2011 7:20 AM
  • Well, it cleans if I provide the code to clean it. I expect the runtime to clean the batching directory of the local and remote provider.

    But I thought that if I define my local provider then after an sync session where the SyncDirectionOrder.Upload, the batching directory will be automatically cleaned by the framework.

    SqlSyncProvider localProvider = new SqlSyncProvider(scopeName, localSqlConnection);
    localProvider.MemoryDataCacheSize = 500;
    localProvider.BatchingDirectory= _batchingDirectory;
    localProvider.CleanupBatchingDirectory = true;//this is by default true
    

    I have found this post http://blogs.msdn.com/b/mahjayar/archive/2009/11/16/msf-v2-deepdive-batching-directory-and-batch-files.aspx where it states that "the runtime cleanup of the batch files happens only on the destination provider". 


    sb_angela
    Thursday, August 11, 2011 8:16 AM
  • if am not mistaken, its the provider that's applying the change that cleans up the directory. in an n-tier setup, the service side provider knows only about its own folder on the server side and not the client side.

     

    • Marked as answer by sb_angela Thursday, August 11, 2011 1:40 PM
    Thursday, August 11, 2011 8:29 AM