3 ms·
I had an idea for handling this situation that exploited the replication functionality. Basically, you prepare for a transaction by migrating the primary copy
by stcredzero 17y ago
I had an idea for handling this situation that exploited the replication functionality. Basically, you prepare for a transaction by migrating the primary copy of all the objects involved to the same node. One would have to avoid deadlocks by sorting and serializing transaction-prep migration blocks. So transactions never span multiple servers, but you get this by possibly dramatically slowing down the time it takes to prepare for such transactions. (With the idea that the application designer is encouraged to avoid such transactions.)
- cx01 17y agoIf you do this for every transaction, you'll have more overhead than you'd have if you had just performed distributed consensus. But in principle you're right. It makes sense to put all the primary copies that are often used together on the same node. The problem is that it's hard to decide the ideal placement strategy. VoltDB puts this responsibility into the hands of the developers.
- stcredzero 17y agoThe point is to a) not have to implement distributed consensus and b) require the user to have to design the database for localized transactions if performance is desired.