I'm reading "designing data intensive applications" page 263. It breaks down the outdated scenario into 2 cases, 1. uncommitted write before read 2. uncommitted write after read
The solution to 1 is to track this write and check before commit. The solution to 2 is to track all reads by index range and when a transaction writes, it notifies the other transactions so it knows that the premise may have been changed.
So both solutions do a check at commit time. So why not always use solution 2? Seems that solution 2 also works for the before case. What's the advantage of keeping track of reads ignored by MVCC rules? Seems simpler and less error prone to just have 1 method that covers both cases since you need to cover case 2 anyway.