-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
distsql: consult liveness during physical planning #23834
Conversation
@solongordon with this change I'm unable to repro any planning errors (sleeping 10s after the kill to make liveness time out). Could you give it a spin too to make sure I'm not messing this up (again)? |
5e8a89a
to
7129623
Compare
Yup, I'm also unable to repro the error with this patch (except within 10s of killing the node). |
Thanks Tobias. You also did DistSender improvements elsewhere, right? Review status: 0 of 3 files reviewed at latest revision, 2 unresolved discussions, all commit checks successful. pkg/sql/distsql_physical_planner.go, line 530 at r1 (raw file):
nit nit: i prefer "as of 03/2018" pkg/sql/distsql_physical_planner.go, line 561 at r1 (raw file):
I'm not a fan of this comment. Better say on the field definition "can be nil for tests", and remove the panic from the ctor too. Comments from Reviewable |
7129623
to
0c75e1e
Compare
PTAL, added rudimentary unit testing. Review status: 0 of 4 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. pkg/sql/distsql_physical_planner.go, line 530 at r1 (raw file): Previously, andreimatei (Andrei Matei) wrote…
Done. pkg/sql/distsql_physical_planner.go, line 561 at r1 (raw file): Previously, andreimatei (Andrei Matei) wrote…
No, that increases the risk that production code passes a Comments from Reviewable |
The recent PR cockroachdb#22658 introduced a regression in `(*rpcContext).ConnHealth` which caused DistSQL to continue planning on unavailable nodes for about an hour (`ttlNodeDescriptorGossip`) if the leaseholder cache happened to not be updated by other non-DistSQL requests. Instead, consult node liveness and avoid planning on dead nodes. This reduces the problem to a <10s window. The defunct `ConnHealth` mechanism still protects against planning in some of cases (supposedly due to a once-per-second reconnection policy) and is retained for that reason, with issue cockroachdb#23829 filed to decide its future. NB: I'm not putting a release note since this was introduced after 1.1. We released it in a beta, though, so it may be worth calling out there. Touches cockroachdb#23601. (Not fixing it because this issue should only close when there's a roachtest). Release note (bug fix): NB: this fixes a regression introduced in 2.0-beta, and not present in 1.1: Avoid planning DistSQL errors against unavailable nodes.
0c75e1e
to
52681e4
Compare
but why no roachtest? Still working on it? Review status: 0 of 4 files reviewed at latest revision, all discussions resolved, all commit checks successful. Comments from Reviewable |
No, haven't even started working on it. But it should be straightforward given the shell snippet that we have. |
TFTR! |
PS DistSender PR is here: #23885 |
23916: backport-2.0: distsql: consult liveness during physical planning r=tschottdorf a=tschottdorf Backport 1/1 commits from #23834. /cc @cockroachdb/release --- The recent PR #22658 introduced a regression in `(*rpcContext).ConnHealth` which caused DistSQL to continue planning on unavailable nodes for about an hour (`ttlNodeDescriptorGossip`) if the leaseholder cache happened to not be updated by other non-DistSQL requests. Instead, consult node liveness and avoid planning on dead nodes. This reduces the problem to a <10s window. The defunct `ConnHealth` mechanism still protects against planning in some of cases (supposedly due to a once-per-second reconnection policy) and is retained for that reason, with issue #23829 filed to decide its future. NB: I'm not putting a release note since this was introduced after 1.1. We released it in a beta, though, so it may be worth calling out there. Touches #23601. (Not fixing it because this issue should only close when there's a roachtest). Release note (bug fix): NB: this fixes a regression introduced in 2.0-beta, and not present in 1.1: Avoid planning DistSQL errors against unavailable nodes.
The recent PR #22658 introduced a regression in
(*rpcContext).ConnHealth
which caused DistSQL to continue planning onunavailable nodes for about an hour (
ttlNodeDescriptorGossip
) if theleaseholder cache happened to not be updated by other non-DistSQL
requests.
Instead, consult node liveness and avoid planning on dead nodes. This
reduces the problem to a <10s window. The defunct
ConnHealth
mechanismstill protects against planning in some of cases (supposedly due to a
once-per-second reconnection policy) and is retained for that reason,
with issue #23829 filed to decide its future.
NB: I'm not putting a release note since this was introduced after 1.1.
We released it in a beta, though, so it may be worth calling out there.
Touches #23601. (Not fixing it because this issue should only close
when there's a roachtest).
Release note (bug fix): NB: this fixes a regression introduced in
2.0-beta, and not present in 1.1: Avoid planning DistSQL errors against
unavailable nodes.