4 ms·
With regard to your 3rd point, conflicts that happen during replication aren't actually first class citizens, if memory serves me well. If you change the same
by skrebbel 13y ago
With regard to your 3rd point, conflicts that happen during replication aren't actually first class citizens, if memory serves me well.
If you change the same field on two databases at roughly the same time, some heuristic determines who wins.
- rdtsc 13y agoThat is true but the conflict is preserved in the database. So a change feed set up to monitor conflicts will notice it immediately. You do have to set up the monitor and conflict resolver. From the CAP standpoint your system is available but not consistent for a short period of time because initially on a GET during a conflicted document you might get one version but after the custom merge resolve runs, it could end up replacing with another. That is the price to pay for availability, and it works best if applications on top are designed to work with it. It is not always possible so this, so it is a tool that is good in some cases but not in all cases.
- mlmilleratmit 13y agoThere is indeed a deterministic but arbitrary choice of the "winner", but there is a big difference with other systems -- no data is discarded. The hash tree branches and both edits are saved. You can choose which branch of the tree you want to start editing, and you can listen to a feed for documents that have conflicting edits and resolve them according to your application logic. The real choice is to never discard data.