...
other fields are obvious.
During scans 'ver' field is checked, if row version is visible (the row was added by current or committed tx) 'xid_max' field of referenced data row is checked - the row considered as visible if it is the last version of row ('xid_max' is NA)
During DML or SELECT FOR UPDATE tx aquires locks one by one.
...
Since all the changes are written right after lock is aquired, all the participants are ready to commit or rollback changes after each successful data changeupdate, so, we can omit prepare stage.
We can use next rules Next rules are used for tx recovery on TX coordinator participant failure:
Each read operation outside active transaction creates a special read only transaction and uses its tx snapshot for versions filtering.
Each read operation within active READ_COMMITTED transaction creates a special read only transaction and uses its tx snapshot for versions filtering.
Each read operation within active REPEATABLE_READ transaction uses its tx snapshot for versions filtering.
During get operation the first passing MVCC filter item is returned.
During secondary indexes scans 'ver' field of tree item is checked, if row version is visible (the row was added by current or committed tx) 'xid_max' field of referenced data row is checked - the row considered as visible if it is the last version of row 'xid_max' is NA or ACTIVE or higher than assigned.
During primary indexes scans 'ver' field of tree item is checked, the first passing MVCC filter item is returned, all next versions of row are skipped.