Skip to content

Commit

Permalink
kv: change TxnCoordSender so that many can be used in a distributed f…
Browse files Browse the repository at this point in the history
…ashion

The key idea here is to stop using a single TxnCoordSender but instead
provide a factory for stateful instances of TxnCoordSender to be used
with each client.DB transaction. The state stored by the TxnCoordSender
can be fetched, collected, passed, and then used to augment a parent
or sibling TxnCoordSender.

This allows DistSQL to use the TxnCoordSender just like normal SQL and
paves the way for mutating distributed SQL transactions. With this change,
we get the added benefit of observed timestamps being correct returned
to the root transaction through distributed sql flows, which should
prevent unnecessary restarts from uncertainty interval errors.

Fixes cockroachdb#10511
Fixes cockroachdb#13376

Release note (dist sql): Removes the limitation that distributed SQL
is not used once a transaction has had writes.
  • Loading branch information
spencerkimball committed Jan 16, 2018
1 parent 522748a commit 1b436e1
Show file tree
Hide file tree
Showing 66 changed files with 2,316 additions and 1,475 deletions.
363 changes: 362 additions & 1 deletion c-deps/libroach/protos/roachpb/data.pb.cc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1b436e1

Please sign in to comment.