Commit 6676559
committed
sql: audit DistSQL supportability for streamer
In c17591e we made so that if we have
a plan that cannot be distributed for any reason, we would disable the
streamer out of caution. This was known to be a super-set of problematic
scenarios, and this commit addresses that oversight.
In particular, it revamps `checkSupportForPlanNode` function so that we
accumulate all possible blockers for DistSQL, and then we examine each
one to decide whether it's safe to use the streamer given the blockers
found. The blockers are accumulated into a bit-map, and the methods have
been adjusted to do a full walk over the planNode tree (as well as over
all expressions) to capture all blockers - this should have negligible
overhead.
An additional improvement is that we now replace errors with different
bits and we can log all blockers for DistSQL not being supported.
What prompted this work was a customer query where we didn't use the
streamer because of "unsupported planNode" distsql error. This was
attempted to be fixed in f6038a1, but
the fix was incomplete, and now it is.
Release note: None1 parent 5c6b9af commit 6676559
File tree
18 files changed
+650
-259
lines changed- pkg
- gen
- sql
- opt/exec/execbuilder/testdata
18 files changed
+650
-259
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
| 684 | + | |
683 | 685 | | |
684 | 686 | | |
685 | 687 | | |
| |||
871 | 873 | | |
872 | 874 | | |
873 | 875 | | |
| 876 | + | |
874 | 877 | | |
875 | 878 | | |
876 | 879 | | |
| |||
1025 | 1028 | | |
1026 | 1029 | | |
1027 | 1030 | | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
1028 | 1037 | | |
1029 | 1038 | | |
1030 | 1039 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
336 | | - | |
| 336 | + | |
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3339 | 3339 | | |
3340 | 3340 | | |
3341 | 3341 | | |
3342 | | - | |
| 3342 | + | |
3343 | 3343 | | |
3344 | 3344 | | |
3345 | 3345 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2893 | 2893 | | |
2894 | 2894 | | |
2895 | 2895 | | |
2896 | | - | |
| 2896 | + | |
2897 | 2897 | | |
2898 | 2898 | | |
2899 | 2899 | | |
| |||
2941 | 2941 | | |
2942 | 2942 | | |
2943 | 2943 | | |
2944 | | - | |
| 2944 | + | |
2945 | 2945 | | |
2946 | 2946 | | |
2947 | 2947 | | |
| |||
3393 | 3393 | | |
3394 | 3394 | | |
3395 | 3395 | | |
3396 | | - | |
| 3396 | + | |
3397 | 3397 | | |
3398 | 3398 | | |
3399 | 3399 | | |
| |||
3418 | 3418 | | |
3419 | 3419 | | |
3420 | 3420 | | |
3421 | | - | |
| 3421 | + | |
3422 | 3422 | | |
3423 | 3423 | | |
3424 | 3424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
| 664 | + | |
665 | 665 | | |
666 | 666 | | |
667 | 667 | | |
| |||
0 commit comments