99% of the time the threads will be writing to completely different tables. However, occasionally they may insert or update a record in a common table to indicate the start or end of a job. If two threads happen by chance to do this concurrently, will this cause a transaction abort as you describe?

Doug


On 11/14/2014 10:20 AM, Hannes Mühleisen wrote:
Hi List,

Multithreaded read access should work great. However, sending updates to a single table concurrently will trigger transaction aborts due to the concurrency model that MonetDB uses. So, if you are doing reads, run as many(*) threads as you like in parallel. If you are doing a lot of writes to a single table, it might be best combining those on a single connection.

Best,

Hannes

(*) We get best results in throughput when using around the same number of threads as there are hardware contexts on the CPU.

On 14 Nov 2014, at 17:28, Alastair McKinley <a.mckinley@analyticsengines.com> wrote:

Hi Doug,

I did have a problem with a similar configuration 

I don't believe concurrent access using MAPI (or any interface) is
currently supported unless things have changed since approx version
11.17.

I had to serialise requests at the client end.  

Best regards,

Alastair

On Fri, 2014-11-14 at 08:13 -0800, Doug Service wrote:
I have installed MonetDB and and started using it through MAPI. The
documentation indicates that opening multiple connections from
separate threads in a single process is supported. I perused the MAPI
source and it appears that all of the Monet data structures used are
associated with the connection.

In our application the threads will be independent and processing
similar but unique data sets each with its own connection to the
database. No threads will share a database connection nor attempt to
use another threads connection. Does anyone have experience using
multiple threads in a single process each accessing a separate
database MonetDB MAPI connection they would like to share? Did you
have any problems? 

Doug Service

_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list
_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list

      

_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list