DSE Graph allows to specify edge cardinalities, i.e. for certain edge labels, it can enforce that only one edge with such a label goes out from any vertex. This works pretty well in manual, linearized tests - trying to set a second edge with the same label will fail.
However, it is unclear to us what the exact guarantees are in concurrency scenarios, i.e. when two threads try to add edges with the same label to a vertex at roughly the same time.
Given Cassandra as the underlying data store, there could be two ways imaginable:
Both threads are observing no present edges. Both threads succeed in adding edges, the first addition is overwritten and only the latter addition is visible.
Some mechanism like Cassandra lightweight transactions is employed, such that an edge will only be added when there is none ('Compare-and-set'). One of the threads is guaranteed to fail.
We assume that DSE Graph guarantees are strong enough that we cannot possibly end with two observable edges with the same label. Is there any information about the actual implementation of DSE Graph regarding this?