Dear Matthew, A quick initial reaction. MonetDB uses an optimistic concurrency control scheme, which is geared at high-read, low-write applications. If you hit the system with multiple concurrent writes on the same table, then indeed to secure acid properties, transactions are bound to fail. MonetDB indeed conforms to the semantics of a transaction safe system. Blocking queries is equivalent to relation level locking. This is not the preferred way to go for the kernel, because someone will immediately ask for more granularities and als relaxation of the ACID principles. There are several application scenarios to deal with this issue, but all depend on the semantics required. regards, Martin Matthew Jones wrote:
I have multiple processes reading and writing to the same table and I've noticed really persistent concurrency problems:
File "/usr/lib/python2.5/site-packages/monetdb/sql/cursors.py", line 208, in execute self.__store_result(block) File "/usr/lib/python2.5/site-packages/monetdb/sql/cursors.py", line 520, in __store_result self.__exception_handler(InterfaceError, "Unknown state, %s" % block) File "/usr/lib/python2.5/site-packages/monetdb/sql/cursors.py", line 574, in __exception_handler raise exception_class(message) InterfaceError: Unknown state, &2 65541 -1 !ERROR: COMMIT: transaction is aborted because of concurency conflicts, will ROLLBACK instead
I'm not sure what the problem is, but it exists in such a way that all operations that load or update information in MonetDB have to be put into a loop to continuously retry.
I'm using autocommit, but I would expect MonetDB to handle concurrency issues in a decent way, like maybe blocking a query until the other query finished. I'm not clobbering data, most of these are just bulk load operations that insert new rows.
Is there any way to address this issue without having to putting retry loops around all of the code I'm writing to write to the database?
73, Matthew W. Jones (KI4ZIB) http://matburt.net
------------------------------------------------------------------------
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
------------------------------------------------------------------------
_______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users