Commit 1b0d0ec
154872: sql/inspect: fix progress tracking bugs causing over 100% completion r=spilchen a=spilchen
Fix two bugs in INSPECT job progress tracking that caused inaccurate completion percentages, sometimes exceeding 100%.
The first issue was in inspect_processor.go, where processSpan() checked the loop termination condition (!ok) before accounting for the final completed check. When the last check finished we would exit the loop before reporting the final check as complete.
The second issue was in inspect_job.go, where initProgressFromPlan() calculated total checks using PK spans rather than the partitioned spans actually used by processors. The number of total checks that we think need to be complete were much lower than the partitioned spans. This caused us to report completion rates in excess of 100%.
Epic: CRDB-30356
Informs: #154457
Release note: none
154878: sql: audit production callers of `rowenc.DatumToEncDatum` r=yuzefovich a=yuzefovich
**sql: audit production callers of `rowenc.DatumToEncDatum`**
This commit audits all callers of `rowenc.DatumToEncDatum` in order to replace possibly unsafe calls to `DatumToEncDatumEx` which requires explicit error handling (the former panics when the datum's resolved type is not equivalent to the passed-in type). I decided to not remove the former method altogether since it seems to be reasonable to use it when we're construcing the datum directly in the call site (and also in tests).
Fixes: #154607.
**rowenc: rename DatumToEncDatum methods**
This commit does the following renaming:
- `DatumToEncDatumEx` -> `DatumToEncDatum`
- `DatumToEncDatum` -> `DatumToEncDatumUnsafe`.
The goal is to encourage usage of safer version which requires explicit error handling (as opposed to panicking). The main use case (apart from tests) for the unsafe version has been documented.
Release note: None
154917: invertedidx: harden geo code to avoid panicking r=yuzefovich a=yuzefovich
Previously, we could panic when trying to construnct an inverted expression for a geo type. Such panics are not recovered from by the vectorized panic-catcher (since we haven't allow-listed the package), so it's better to propagate errors explicitly.
In particular, this allows us to prevent a crash when trying to evaluate `st_dwithin`-like functions with infinite distance (this hits an error in geos, so now we'll return an error, matching postgres).
Fixes: #151995.
Release note: None
154963: sql/parser: fix bug parsing WITH READ VIRTUAL CLUSTER with other opts r=dt a=dt
Release note (bug fix): Fix a bug that would cause WITH READ VIRTUAL CLUSTER to be ignored if any other options were passed when running CREATE VIRTUAL CLUSTER FROM REPLICATION.
Epic: none.
154965: roachtest: fix test failure in DSC compat test r=rafiss a=rafiss
The test was failing since it was renaming a table that is used by a view.
fixes #154809
Release note: None
Co-authored-by: Matt Spilchen <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: David Taylor <[email protected]>
Co-authored-by: Rafi Shamim <[email protected]>
File tree
70 files changed
+448
-226
lines changed- pkg
- backup
- ccl/changefeedccl
- avro
- cdcevent
- kcjsonschema
- cmd/roachtest/tests
- crosscluster
- logical
- physical
- sql
- colexec
- colexecspan
- distsql
- execinfra
- export
- flowinfra
- importer
- inspect
- logictest/testdata/logic_test
- opt/invertedidx
- parser/testdata
- randgen
- rowcontainer
- rowenc
- rowexec
- rowflow
- row
- sem/tree
- span
- stats
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+448
-226
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
| 256 | + | |
| 257 | + | |
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
| |||
399 | 399 | | |
400 | 400 | | |
401 | 401 | | |
402 | | - | |
| 402 | + | |
403 | 403 | | |
404 | 404 | | |
405 | 405 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
998 | | - | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
| 1001 | + | |
999 | 1002 | | |
1000 | 1003 | | |
1001 | 1004 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
951 | 951 | | |
952 | 952 | | |
953 | 953 | | |
954 | | - | |
955 | | - | |
| 954 | + | |
| 955 | + | |
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
| 1062 | + | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
810 | 810 | | |
811 | 811 | | |
812 | 812 | | |
813 | | - | |
| 813 | + | |
814 | 814 | | |
815 | 815 | | |
816 | 816 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
162 | | - | |
| 161 | + | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
| |||
470 | 470 | | |
471 | 471 | | |
472 | 472 | | |
473 | | - | |
474 | | - | |
| 473 | + | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
| 242 | + | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
120 | | - | |
| 119 | + | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
376 | 376 | | |
377 | 377 | | |
378 | 378 | | |
379 | | - | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
| 535 | + | |
536 | 536 | | |
537 | 537 | | |
538 | 538 | | |
| |||
0 commit comments