Multi-threaded Support

Nov 2, 2011 at 8:53 AM
Edited Nov 2, 2011 at 8:59 AM


I just like to confirm the approach for using Sterling in a multi-threaded environment where multiple threads are reading/writing to the store at the same time.  I had a look at the source code and it seems like this is supported out-of-the-box.  The locking seems to happen upon the path which is unique for the different tables (i.e. types) being saved in the database.  That implies that I can read/write to different tables at the same time and that multiple reads/writes to the same table will block allowing single reads/writes at a time.  Are these assumptions correct?  With happens with db-wide operations like Purge/Flush etc.?


Nov 2, 2011 at 11:07 AM

Yes, it is designed to be supported out of the box. Truncate and Purge do expect that you make an effort in the application to get out of those files before calling those functions.