locked
SycFramework 2.0 CTP2.0 - Not able to set BatchDirectory RRS feed

  • Question

  • It doen't seem to be able to change BatchingDirectory for the client side DBSyncProvider .

    No error raised when the property is set to a new path, but when batch files are spooled, they are always saved under the user profile folder of the current running user.

    Anyone experienced this?

    Tuesday, July 28, 2009 5:24 AM

All replies

  • CleanupBatchingDirectory doesn't seem to work either.
    Tuesday, July 28, 2009 5:41 AM
  • Hey,

    Depending on Sync direction, different BatchDirectory would be used to keep spooled batch files. If Sync from Server to Client, the BatchDirectory on Server side DbSyncProvider will be used and if Sync from Client to Server, the BatchDirectory on Client side DbSyncProvider will be used. And both BatchDirectory would be used for Bi-Direction sync. Please set the BatchDirectory accordingly.

    Thanks,


    Ann Tang
    Wednesday, August 5, 2009 6:09 PM
  • I'm using SqlSyncProvider for Peer-to-peer synchronisation.  It's Upload only.  The client is the initiation party.

    But I can't seem to be able to change the BatchDirectory for the client.  Also the BatchDirectory on client side isn't cleaned up after a successful synchronization.  This is even when CleanupBatchDirectory property is set to True.

    Sunday, August 9, 2009 11:58 PM
  • MichaelZh,
    The runtime will use the batchdirectoy property set on the enumerating provider. In Peer -to Peer there is no specific server/client side. We just have two peer providers (Db/Sql/SqlCeSyncProvider). When you have set the sync direction to upload only then the BatchDirectory for the LocalProvider is used. Can you confirm that you are not seeing this behavior?

    Reg the cleanup of batch files, do you see any sync_XXXXXX folder under your batch directory after a successful sync? Each sync session drops batch file in to a new sub directory under the uber batching directory provided by the user. It is this sub directory that is cleaned up after each sync session.
    Maheshwar Jayaraman - WCF -- http://blogs.msdn.com/dotnetremoting
    Friday, August 21, 2009 4:30 AM
    Moderator
  • Sorry for the delay...

    To confirm, I could set the BatchDirectory for the LocalProvider.

    For the LocalProvider, sync_XXXX folder is created under the specified BatchDirectory.  This folder contains a number of xxxx.batch files and SyncBatchHeaderFile.sync file.  When a sync session completed successfully, everything are still there.  Nothing has been cleaned up, not the sync_xxx folder or any xxx.batch files under it.  This is when ClearBatchDirectory is set to true.

    Michael
    Monday, August 31, 2009 1:16 AM
  • Could you please confirm the sync_xxxx folder left is for the successful sync session ( not from some failed sync session)? If yes, could you please share with me the code you setup you providers and batchDirectory and i'll try to get a repro?

    Thanks,
    Ann Tang
    Tuesday, September 1, 2009 11:29 PM
  • Thanks, Ann

    Yes, I can confirm that sync_xxx folder left intact with all the *.batch files even after a successful sync session.    However, it appears that the next sync session would remove the whole lot before recreating the same folder with new *.batch files.

    I simply assign a local folder path to the BatchDirectory of the LocalProvider at the time it's instantiated.  I also explicitly set CleanBatchingDirectory to True.  My local provider is derived from DbSyncProvider.  My RemoteProvider also derives from DbSyncProvider and it's a wrapper of the WCF service proxy.  This is the setup at the Peer1.

    Hopefully this information would be sufficient for your repro.

    Michael
    Wednesday, September 2, 2009 1:53 AM