Commit f5ff484
committed
sql/fingerprint: add new job fingerprint spans job
This just adds the job itself; it is currently unused outside of its
direct tests included here (i.e. there is no code path to create these
jobs wired up yet).
This new job computes the kv fingerprint of the configured spans using
the KV ExportRequest fingerprint mechanism, and stores progress and the
result in the job's job_info rows.
This KV fingerprint currently only fingerprints as of a given timestamp;
it does not fingerprint all revisions prior to that timestamp. This
means it does not need to support representing range deletions in its
fingerprint, as those are not directly observed: you either observe the
keys they deleted if you read prior to them, or don't observe them if
you read after the deletion and reflect those keys or their absense in
the fingerprint accordingly, but do not need to repesent the deletion
itself in the fingerprint. This substantially simplifies the collection
of the fingerprint from separate ExportRequests, as we do not need to
accumulate and defragment partial range deletions across requests.
The KV mode added here is useful for comparing the result of any sort of
byte-for-byte copying of data, such as done by a RESTOTRE or PCR. A
future "SQL" fingerprint implementation could be an alternative to the
KV fingerprinter used here currently, which would use SQL-level scans
and schema-aware datum decoding to compute fingerprints over decoded,
logical values. While more expensive, this can be useful for cases where
logically eqiuivalent data may have different on-disk representations
(e.g. composite types), making such a mode ideal for comparing data
copied by something like LDR.
Release note: none.
Epic: none.1 parent 92af8a2 commit f5ff484
File tree
8 files changed
+778
-2
lines changed- docs/generated/metrics
- pkg
- jobs
- jobspb
- roachprod/agents/opentelemetry/files
- sql/fingerprint
8 files changed
+778
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4430 | 4430 | | |
4431 | 4431 | | |
4432 | 4432 | | |
| 4433 | + | |
| 4434 | + | |
| 4435 | + | |
| 4436 | + | |
| 4437 | + | |
| 4438 | + | |
| 4439 | + | |
| 4440 | + | |
| 4441 | + | |
| 4442 | + | |
| 4443 | + | |
| 4444 | + | |
| 4445 | + | |
| 4446 | + | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
| 4450 | + | |
| 4451 | + | |
| 4452 | + | |
| 4453 | + | |
| 4454 | + | |
| 4455 | + | |
| 4456 | + | |
| 4457 | + | |
| 4458 | + | |
| 4459 | + | |
| 4460 | + | |
| 4461 | + | |
| 4462 | + | |
| 4463 | + | |
| 4464 | + | |
| 4465 | + | |
| 4466 | + | |
| 4467 | + | |
| 4468 | + | |
| 4469 | + | |
| 4470 | + | |
| 4471 | + | |
| 4472 | + | |
| 4473 | + | |
| 4474 | + | |
| 4475 | + | |
| 4476 | + | |
| 4477 | + | |
| 4478 | + | |
| 4479 | + | |
| 4480 | + | |
| 4481 | + | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
4433 | 4532 | | |
4434 | 4533 | | |
4435 | 4534 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1534 | 1534 | | |
1535 | 1535 | | |
1536 | 1536 | | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
1537 | 1549 | | |
1538 | 1550 | | |
1539 | 1551 | | |
| |||
1659 | 1671 | | |
1660 | 1672 | | |
1661 | 1673 | | |
| 1674 | + | |
1662 | 1675 | | |
1663 | 1676 | | |
1664 | 1677 | | |
| |||
1743 | 1756 | | |
1744 | 1757 | | |
1745 | 1758 | | |
| 1759 | + | |
1746 | 1760 | | |
1747 | 1761 | | |
1748 | 1762 | | |
| |||
1790 | 1804 | | |
1791 | 1805 | | |
1792 | 1806 | | |
| 1807 | + | |
1793 | 1808 | | |
1794 | 1809 | | |
1795 | 1810 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| 86 | + | |
85 | 87 | | |
86 | 88 | | |
87 | 89 | | |
| |||
249 | 251 | | |
250 | 252 | | |
251 | 253 | | |
| 254 | + | |
| 255 | + | |
252 | 256 | | |
253 | 257 | | |
254 | 258 | | |
| |||
305 | 309 | | |
306 | 310 | | |
307 | 311 | | |
| 312 | + | |
308 | 313 | | |
309 | 314 | | |
310 | 315 | | |
| |||
378 | 383 | | |
379 | 384 | | |
380 | 385 | | |
| 386 | + | |
| 387 | + | |
381 | 388 | | |
382 | 389 | | |
383 | 390 | | |
| |||
449 | 456 | | |
450 | 457 | | |
451 | 458 | | |
| 459 | + | |
| 460 | + | |
452 | 461 | | |
453 | 462 | | |
454 | 463 | | |
| |||
520 | 529 | | |
521 | 530 | | |
522 | 531 | | |
| 532 | + | |
| 533 | + | |
523 | 534 | | |
524 | 535 | | |
525 | 536 | | |
| |||
615 | 626 | | |
616 | 627 | | |
617 | 628 | | |
| 629 | + | |
| 630 | + | |
618 | 631 | | |
619 | 632 | | |
620 | 633 | | |
| |||
650 | 663 | | |
651 | 664 | | |
652 | 665 | | |
653 | | - | |
| 666 | + | |
654 | 667 | | |
655 | 668 | | |
656 | 669 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
845 | 856 | | |
846 | 857 | | |
847 | 858 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
9 | 20 | | |
| 21 | + | |
10 | 22 | | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | 26 | | |
| 27 | + | |
| 28 | + | |
13 | 29 | | |
14 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
15 | 35 | | |
| 36 | + | |
16 | 37 | | |
17 | 38 | | |
18 | 39 | | |
19 | 40 | | |
20 | 41 | | |
21 | 42 | | |
| 43 | + | |
22 | 44 | | |
23 | 45 | | |
24 | 46 | | |
25 | 47 | | |
26 | 48 | | |
27 | 49 | | |
| 50 | + | |
| 51 | + | |
28 | 52 | | |
29 | 53 | | |
30 | 54 | | |
| 55 | + | |
31 | 56 | | |
32 | 57 | | |
| 58 | + | |
33 | 59 | | |
| 60 | + | |
34 | 61 | | |
35 | 62 | | |
36 | 63 | | |
| 64 | + | |
37 | 65 | | |
| 66 | + | |
38 | 67 | | |
39 | 68 | | |
40 | 69 | | |
0 commit comments