Understanding concurrency control
By now, hopefully, we have a good understanding of ACID compliance in a Delta Lake using the transaction log. Up until now, all operations during this exercise were performed using the same user. However, in a real case scenario, you can have multiple users trying to read and write to the same delta table at the same time. This is how concurrency controls are implemented in Delta Lake.
This is better represented as follows:
- Assume User 1 and User 2 perform a write operation to a delta table at the same time.
- Delta Lake records the version of the table before any change has been made to the delta table.
- The write from User 1 commits successfully, and a success message is sent back.
- The write from User 2 does not fail. Instead, Delta Lake tries to silently resolve conflicts from User 2's transaction against the previously committed data. If no conflicts...