Commit 971c63b
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 causes for DistSQL being prohibited, and then we
examine each one to decide whether it's safe to use the streamer given
the causes found. The causes 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 causes - this should have
negligible overhead.
An additional improvement is that we now replace errors with different
bits and we can log all causes 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 474dc62 commit 971c63b
File tree
17 files changed
+648
-258
lines changed- pkg
- gen
- sql
- opt/exec/execbuilder/testdata
17 files changed
+648
-258
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 | |
|---|---|---|---|
| |||
2879 | 2879 | | |
2880 | 2880 | | |
2881 | 2881 | | |
2882 | | - | |
| 2882 | + | |
2883 | 2883 | | |
2884 | 2884 | | |
2885 | 2885 | | |
| |||
2927 | 2927 | | |
2928 | 2928 | | |
2929 | 2929 | | |
2930 | | - | |
| 2930 | + | |
2931 | 2931 | | |
2932 | 2932 | | |
2933 | 2933 | | |
| |||
3379 | 3379 | | |
3380 | 3380 | | |
3381 | 3381 | | |
3382 | | - | |
| 3382 | + | |
3383 | 3383 | | |
3384 | 3384 | | |
3385 | 3385 | | |
| |||
3404 | 3404 | | |
3405 | 3405 | | |
3406 | 3406 | | |
3407 | | - | |
| 3407 | + | |
3408 | 3408 | | |
3409 | 3409 | | |
3410 | 3410 | | |
| |||
| 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