-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: deal with retriable errors when using a new txn #46829
sql: deal with retriable errors when using a new txn #46829
Conversation
5e72b5c
to
74cb251
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.prepare
Fixes #43251
Release note: None