Replication and Key Compare Exchange

6 views
Skip to first unread message

Iain Roberts

unread,
Dec 6, 2021, 8:25:45 PM12/6/21
to RavenDB - an awesome database
Hi,

I am using Key Compare Exchange to implement unique constraints. I appreciate this is a cluster wide transition and as such one needs to be careful of how this can reduce availability.

Regarding External Replication, is it still the case it does Documents and not compare exchange values?


Another factor to consider is that RavenDB replicates documents  and their data, but compare exchange values aren’t considered in this case. They are global to the cluster, and as such aren’t sent via replication.

Cheers,

Iain

Egor Shamanaev

unread,
Dec 7, 2021, 2:14:23 AM12/7/21
to rav...@googlegroups.com
Hi

Compare exchange is cluster wide operation which is stored on the cluster level, so you can access it regardless of the database,.
Replicating compare exchange values across clusters is not a supported operation for a simple reason, there is no consistency boundary in that case.
And the whole point of compare exchange is to ensure consistency of the values within the cluster.

--
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome 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/b50727a2-a7a6-4028-a63f-57fd772cd268n%40googlegroups.com.


--
Egor
Developer   /   Hibernating Rhinos LTD
Support:  sup...@ravendb.net
  

Oren Eini (Ayende Rahien)

unread,
Dec 7, 2021, 7:57:41 AM12/7/21
to rav...@googlegroups.com
For ensuring unique constraint via cluster wide transactions, you have to take into account that the scope is the cluster, not across replication.



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

Iain Roberts

unread,
Dec 7, 2021, 8:37:19 PM12/7/21
to RavenDB - an awesome database
Thanks Eini for confirming, and that makes sense.
Reply all
Reply to author
Forward
0 new messages