You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#2004.
The gRPC code gets the `Status` information from the server to know if a
transaction was successful. Now, every time we try to run a statement,
the `is_autocommit` is run on the remote connection to know if we are in
a `State::Txn` or not.
After that, the code is basically a copy of
`crate::replication::connection::should_execute_local` with the addition
that when matching if the code should execute locally, the `state` is
set to the `predicted_end_state`. This step was skipped by the old
implementation because after a remote statement statement executed, the
end state came from the server as mentioned before.
`state` is mostly concerned to know if the server is in a transaction
and that we should keep sending remote queries until a `COMMIT` or
`ROLLBACK`. The match statement _could_ be refactored to reflect this
more clearly.
0 commit comments