Closed kelvich closed 8 years ago
That's a great improvement over the previous API! Does the dtm_begin_transaction need to be in the same transaction block, or does it just call the DTMD? For example, if the coordinator had the DTM extension installed, could it call dtm_begin_transaction locally?
dtm_begin_transaction should be called before transaction and on the node where that transaction will take place. So no, you can't call it on master but perform transaction on different node.
What we have now with global selects -- it's our banking test. When pg_shard.use_dtm_transactions is on we see only one value of total amount of money on accounts, and when pg_shard.use_dtm_transactions is off total amount frequently fluctuates during concurrent updates.
This is neat, but is it actually intended for merging, or just part of a proof-of-concept I'm not privy to?
Notably:
Oh, I completely missed that the target for this PR is not develop
. Carry on!
We slightly changed DTM interface and now it should be called in following way:
Also I've added PrepareDtmTransaction to distributed selects too, so now we can have consistent read transactions too.