36

Suppose that a given table already contains the following key value pair:

"abc" => { i: 1, v: "foo" }

Then, two clients issue conflicting concurrent conditional writes. Client 1 writes:

"abc" => { i: 2, v: "bar1" } if i == 1

Client 2 writes:

"abc" => { i: 2, v: "bar2" } if i == 1

Then, is it guaranteed that at most one client's write operation will succeed?

Aliostad
  • 80,612
  • 21
  • 160
  • 208
nccc
  • 1,095
  • 3
  • 11
  • 20

1 Answers1

21

Yes, that's exactly the use case they're designed for. You can see an example in the docs.

PherricOxide
  • 15,493
  • 3
  • 28
  • 41