sql: deal with retriable errors when using a new txn#46829
sql: deal with retriable errors when using a new txn#46829craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
5e72b5c to
74cb251
Compare
andreimatei
left a comment
There was a problem hiding this comment.
LGTM
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @andreimatei)
pkg/sql/conn_executor_test.go, line 635 at r1 (raw file):
} // This test ensures that when in an explicit transaction and statement
implicit. And maybe put it in the test's name too.
pkg/sql/conn_executor_test.go, line 659 at r1 (raw file):
testDB.Exec(t, "CREATE TABLE foo (i INT PRIMARY KEY)") stmt, err := sqlDB.Prepare("SELECT * FROM [SHOW COLUMNS FROM foo]")
make this statement simpler now that we have the knob
74cb251 to
4be0321
Compare
In cockroachdb#46588 a bug was introduced when a retriable error was encountered while using a new transaction for preparing. Prior to that commit, all error were treated as not retriable. This was sort of a bummer. Retriable errors can occur due to read within uncertainty. Before this PR, those retriable errors would make their way to the client. Now we'll handle those retry errors internally underneath `connExecutor.prepare` Fixes cockroachdb#43251 Release note: None
4be0321 to
52653e6
Compare
ajwerner
left a comment
There was a problem hiding this comment.
TFTR!
bors r=andreimatei
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @andreimatei)
pkg/sql/conn_executor_test.go, line 635 at r1 (raw file):
Previously, andreimatei (Andrei Matei) wrote…
implicit. And maybe put it in the test's name too.
Done, this whole description was wrong.
pkg/sql/conn_executor_test.go, line 659 at r1 (raw file):
Previously, andreimatei (Andrei Matei) wrote…
make this statement simpler now that we have the knob
Done.
Canceled (will resume) |
Build failed (retrying...) |
|
bors r+ |
Build succeeded |
In #46588 a bug was introduced when a retriable error was encountered while
using a new transaction for preparing. Prior to that commit, all error were
treated as not retriable. This was sort of a bummer. Retriable errors can
occur due to read within uncertainty. Before this PR, those retriable errors
would make their way to the client. Now we'll handle those retry errors
internally underneath
connExecutor.prepareFixes #43251
Release note: None