A mechanism is described for constructing work granules, where the work granules
are constructed independently of whether two or more of the work granules are assigned
to operate on a logical storage unit that contains a portion of the same row. A
database system maintains transaction control data for data blocks in a manner
that avoids self-deadlocks for slaves that follow a row collision protocol. A row
collision protocol is a set of rules or steps that slaves follow to ensure that
only one subtransaction in a distributed transaction updates a spanning row. Thus,
for a particular spanning row, a single subtransaction modifies all the row pieces
of the spanning row in any data block containing any row pieces of the spanning
row. Consequently, a given data block may be affected by multiple subtransactions
in a distributed transaction, one subtransaction affecting a row piece in the data
block, another subtransaction affecting other rows in the data block.