-
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
distsqlrun: add test for stream timeout #14132
distsqlrun: add test for stream timeout #14132
Conversation
cc @RaduBerinde |
Review status: 0 of 4 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. pkg/sql/distsqlrun/flow_registry.go, line 185 at r2 (raw file):
This suggests that they will be stuck forever, mention that they will time out. pkg/sql/distsqlrun/flow_registry_test.go, line 165 at r2 (raw file):
and future attempts Comments from Reviewable |
Reviewed 2 of 2 files at r1, 4 of 4 files at r2. pkg/sql/distsqlrun/flow_registry_test.go, line 37 at r2 (raw file):
you are accessing a map on this copy, but maps are shallow copies. see race failures in TC. Comments from Reviewable |
pkg/sql/distsqlrun/flow_registry_test.go, line 37 at r2 (raw file): Previously, tamird (Tamir Duberstein) wrote…
The problem is with the Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. pkg/sql/distsqlrun/flow_registry_test.go, line 37 at r2 (raw file): Previously, RaduBerinde wrote…
Oh, now I see what you meant. Yeah, we could also make a copy of the map here. Comments from Reviewable |
It wasn't used in prod.
087dbbf
to
24cd6fa
Compare
Review status: 0 of 5 files reviewed at latest revision, 3 unresolved discussions, some commit checks pending. pkg/sql/distsqlrun/flow_registry.go, line 185 at r2 (raw file): Previously, RaduBerinde wrote…
Done. pkg/sql/distsqlrun/flow_registry_test.go, line 37 at r2 (raw file): Previously, RaduBerinde wrote…
Thanks; I've done something. pkg/sql/distsqlrun/flow_registry_test.go, line 165 at r2 (raw file): Previously, RaduBerinde wrote…
Done. Comments from Reviewable |
Comments from Reviewable |
Reviewed 4 of 4 files at r3, 5 of 5 files at r4. pkg/sql/distsqlrun/flow_registry.go, line 185 at r2 (raw file): Previously, andreimatei (Andrei Matei) wrote…
"time out" pkg/sql/distsqlrun/flow_registry.go, line 40 at r4 (raw file):
this comment is appropriate on the member whose type is pkg/sql/distsqlrun/flow_registry.go, line 61 at r4 (raw file):
same comment; this should be on the data structure of this type, rather than the type itself pkg/sql/distsqlrun/flow_registry.go, line 243 at r4 (raw file):
Looks likely to rot and not particularly useful - surely this is easy to discover based on prevailing convention. pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file):
"must" pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file):
"and a cleanup function" pkg/sql/distsqlrun/flow_registry.go, line 247 at r4 (raw file):
unregister pkg/sql/distsqlrun/flow_registry.go, line 274 at r4 (raw file):
is there a need for this pkg/sql/distsqlrun/flow_registry.go, line 282 at r4 (raw file):
every other location checks for presence; is it intended that this does not? pkg/sql/distsqlrun/flow_registry_test.go, line 60 at r4 (raw file):
since you're pkg/sql/distsqlrun/flow_registry_test.go, line 225 at r4 (raw file):
again, this wrapping is the hardest possible style to parse pkg/sql/distsqlrun/server.go, line 194 at r4 (raw file):
worst possible wrapping :( pkg/sql/distsqlrun/server.go, line 199 at r4 (raw file):
this should be above the log line Comments from Reviewable |
We didn't have any tests exercising a stream failing to connect within the registry's timeout. I've changed the fr.ConnectInbound interface slightly - made it return a RowReceiver explicitly so that callers don't access the inboundStreamInfo's fields without the flow registry lock - which is documented to be required.
24cd6fa
to
1632f44
Compare
Review status: 2 of 5 files reviewed at latest revision, 14 unresolved discussions. pkg/sql/distsqlrun/flow_registry.go, line 185 at r2 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 40 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
meh. I moved it but I'm not sure; for this inner type that only lives in one mape, it might have been more visible here. pkg/sql/distsqlrun/flow_registry.go, line 61 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 243 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 247 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 274 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry.go, line 282 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
yeah, intended. if it's missing, it'll panic on result dereferencing pkg/sql/distsqlrun/flow_registry_test.go, line 60 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/flow_registry_test.go, line 225 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. pkg/sql/distsqlrun/server.go, line 194 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
this one is the best possible :) pkg/sql/distsqlrun/server.go, line 199 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
Done. Comments from Reviewable |
Reviewed 3 of 3 files at r5. pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file): Previously, andreimatei (Andrei Matei) wrote…
y u remove the oxford comma :( pkg/sql/distsqlrun/flow_registry.go, line 282 at r4 (raw file): Previously, andreimatei (Andrei Matei) wrote…
okay. i think you can probably produce a more useful panic message than the NPE panic. pkg/sql/distsqlrun/flow_registry.go, line 72 at r5 (raw file):
where is the flow registry mutex? perhaps "this entry's parent registry's mutex" pkg/sql/distsqlrun/server.go, line 194 at r4 (raw file): Previously, andreimatei (Andrei Matei) wrote…
Not true!
as-written, it's hard to see why the indentation is set back on the next line (this was the pathological case we discussed in that ancient nerd battle). Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. pkg/sql/distsqlrun/flow_registry.go, line 246 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
I like oxford commas too but not updating the PR for it. If should have\ come up with one more thing! pkg/sql/distsqlrun/flow_registry.go, line 72 at r5 (raw file): Previously, tamird (Tamir Duberstein) wrote…
mine is more clear pkg/sql/distsqlrun/server.go, line 194 at r4 (raw file): Previously, tamird (Tamir Duberstein) wrote…
it's set back because it's a new statement, starts with an Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. pkg/sql/distsqlrun/flow_registry.go, line 72 at r5 (raw file): Previously, andreimatei (Andrei Matei) wrote…
literally isn't - i asked because I couldn't guess it. then I opened this file and found that flowRegistery has a map of flows, which is why I suggested this edit. Comments from Reviewable |
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful. pkg/sql/distsqlrun/flow_registry.go, line 72 at r5 (raw file): Previously, tamird (Tamir Duberstein) wrote…
flowRegistry is clearer than "parent". Comments from Reviewable |
We didn't have any tests exercising a stream failing to connect within
the registry's timeout.
This change is