When we edit a reference, we commit two transactions:
- One that removes all the content from the internalItem for that reference
- One that inserts the new content into the internalItem, but by replacing the contents of the entire internalList
When we insert a new reference, we commit five(!) transactions:
- One that inserts a new empty internalItem
- One that fills in the contents for that internalItem by replacing the contents of the entire internalList
- One that inserts the mwReference node
- One that removes all the content from the internalItem
- One that puts that same content back again by replacing the contents of the entire internalList
This is pretty crazy and should be cleaned up for many reasons, but one particular problem for rebaser is that some of these transactions replace the entire internalList, which means that any other transaction touching the internal list will conflict with those.