Optimistic concurrency and Cluster Wide Transaction

58 views
Skip to first unread message

Nik

unread,
Jan 14, 2021, 7:33:32 AM1/14/21
to RavenDB - 2nd generation document database
Hi,

Wondering why optimistic concurrency is not possible for a cluster-wide transaction.

Ie, specifying a change vector and prior to executing the cluster-wide transaction doing a vector comparison by the rules defined for a single node transaction? 

I'm sure there is some strong reason opt. concurrency is not part of a cluster-wide transaction but I'm not sure what it is. : )


Oren Eini (Ayende Rahien)

unread,
Jan 18, 2021, 1:47:11 PM1/18/21
to ravendb
Because there may be a non cluster wide transaction that is happening in the same time.
Optimistic concurrency in cluster wide transaction can be done using cluster wide transactions.

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/515e8940-c4e5-4466-bcce-b7fec69ee25en%40googlegroups.com.


--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  

Nik

unread,
Jan 19, 2021, 5:40:00 AM1/19/21
to RavenDB - 2nd generation document database
Thanks Oren,

Just to confirm, with your last sentence did you mean to say "optimistic concurrency in cluster wide transaction can't be done using cluster wide transactions" ?

Oren Eini (Ayende Rahien)

unread,
Feb 1, 2021, 7:06:18 AM2/1/21
to ravendb
No, optimistic concurrency can be done with cluster wide transactions using compare exchange, see: https://ayende.com/blog/183426-C/ravendb-4-1-features-cluster-wide-acid-transactions

Nik

unread,
Feb 1, 2021, 7:41:32 AM2/1/21
to RavenDB - 2nd generation document database
Thanks Oren,

I guess that implies that for regular document updates that need to be transaction-wide, we want to have an incremental version for each document stored in the compare exchange.

Oren Eini (Ayende Rahien)

unread,
Feb 3, 2021, 5:52:41 PM2/3/21
to ravendb
Reply all
Reply to author
Forward
0 new messages