I have a very particular question regarding Paxos algorithm, which is implemented in Cassandra's lightweight transactions:
What happens if two nodes issue the same proposal at the same time? Do them both get '[applied]: true' ?
For example, consider this table:
ids:
+-------------------+---------------+
| id_name (varchar) | next_id (int) |
+-------------------+---------------+
| person_id | 1 |
+-------------------+---------------+
And this query:
UPDATE ids
SET next_id = 2
WHERE id_name = 'person_id'
IF next_id = 1
If I execute this query, I get as a response:
[{[applied]: True}]
If I execute it again, which then it won't be accepted since next_id != 1, I get:
[{[applied]: False, next_id: 2}]
My question is - what happens if I execute this query from two nodes in parallel. Is there a chance that they both get accepted?
(My use case is described in this stackoverflow question)