mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 21:47:10 +00:00
Cassandra detects when a batch has both an IF EXISTS and IF NOT EXISTS on the same row, and complains this is not a useful request (after all, it can never succeed, because the batch can only succeed if both conditions are true, and that can't be if one checks IF EXISTS and the other IF NOT EXISTS). This patch adds a test, test_lwt_with_batch_conflict_1, which checks that this case results in an error. It passes on Cassandra, but xfails on Scylla which doesn't report an error in this case. A second test, test_lwt_with_batch_conflict_2, shows that the detection of the EXISTS / NOT EXISTS conflict is special, and other conflicts such as having both "r=1" and "r=2" for the same row, are NOT detected by Cassandra. Refs #13011. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes #13270