parallel access of database

Mar 25, 2011 at 3:38 AM


I have a case of downloading and saving records in database , which is in thread.

And in Main thread i try to read records or save some other type of records.

Some times this works fine, and sometimes throws exception (when thread running and tombstoned etc).

Do I need to synchronize or database operations are already synchronized?

Mar 25, 2011 at 10:30 AM

Database operations are synchronized to the table instance level as well as the collection level. It should handle your scenario but as always if it is not, let me know some tips on how I can reproduce it and I'll dig into it deeper. There is a "SaveAsync" set of tests that attempts to do things like saving/loading simultaneously, that is the test I'd build on if it's not hitting your case.