Commit 040fce3
Use Merkle trees in ACE (#253)
* Added build-mtree to build a merkle tree for a table
* Fix node_list population
* Also minimise critical section in compare_checksums
* Use same block ranges on all nodes
* Breakthrough: extending a merkle tree on new inserts works
* Sweeping optimisations in table-diff
* Use an optimised sql query instead of get_pkey_offsets
* Fix pkey offsets query
* Added feature to merge blocks on large deletes
* Handle blocks splits and merges inside ACE
* Fix some rebalancing bugs
* Integrate merkle trees into ACE cli
* Update mtree only splits blocks
* Merges happen only when --rebalance=true
is passed
* Adding mtree diff
* First version of mtree diff ready
* Add progress bar for splits and merges
* Use always trigger for tracking dirty blocks
* Update cryptography to address CVE
* No longer using OrderedSet for comparisons
* Handle mismatching tree levels
* Use generic trigger functions
* Initialise mtree objects once per DB node
* More cleanup
* Tweaks to get all base tests to pass
* Use SQL composables; fix rebalance issues
* Unify pkey offset computations
* Add support for specifying a ranges file
* Remove node len check for mtree build
* Update leaf hash during mtree update
* Temp fix for range boundary issue
* Address boundary issues using a lookup table
* Use prepared statements
* Sunset batches option and async rerun
* Add block boundary and repset-diff tests
* Remove explicit stmt.close()
* Add support for composite keys; use stmt triggers
* SQL cleanup
* Add mtree init, teardown; fix block size usage
* Added merkle tree tests
* Use mogrify during repairs
* Prior use of executemany would internally call
execute multiple times, thereby making repairs slow
because of statement triggers from mtrees
* Fix write-ranges to use str by default
* Add support for non-numeric datatypes in tracking triggers
* Fix conn establishment in cleanup
* Address codacy issues
* Addressed more codacy issues
* String literal fix
* Codacy fix #4
* Codacy fix #5
* Use nosemgrep
* More nosemgreps
* Add mtree cli helptext
* Fix metadata task type
* Add metadata tracking for mtree modules
* Move error codes out of config file
* Use a separate consts file
* Revamp ACE CLI invocation
* Group mtree cmds into a sub-cmd
* Treat each of table-diff, -repair, etc. as a top-level sub-cmd
* Update tests
* Fix table names in mtree test
* Minor fixes
* Help texts mostly fixed
* fix fire.py helptext generation for mtree submodule
* generate help for ace mtree submodule
* Backward compatibility fixes
* Rename 'override-block-size' to 'skip-block-size-check' to free up -o
* Add back 'block_rows' as an alias of 'block_size'
* Add back 'behavior' in rerun and mark as deprecated
* Improve merkle tree help text
* Fix tests
* update generated helptext
* Ensure pgcrypto is present
* Fix spock diff
---------
Co-authored-by: Matthew Mols <matt@pgedge.com>1 parent cd59123 commit 040fce3
File tree
42 files changed
+8210
-1721
lines changed- cli
- scripts
- ace-tests
- docs
- functions
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+8210
-1721
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
11 | 20 | | |
12 | 21 | | |
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
16 | 25 | | |
17 | | - | |
| 26 | + | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| |||
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
60 | | - | |
| 69 | + | |
61 | 70 | | |
62 | 71 | | |
63 | 72 | | |
| |||
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
72 | | - | |
| 81 | + | |
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
76 | 85 | | |
77 | 86 | | |
78 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
79 | 100 | | |
80 | 101 | | |
81 | 102 | | |
| |||
132 | 153 | | |
133 | 154 | | |
134 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
135 | 182 | | |
136 | 183 | | |
137 | 184 | | |
| |||
146 | 193 | | |
147 | 194 | | |
148 | 195 | | |
149 | | - | |
| 196 | + | |
150 | 197 | | |
151 | 198 | | |
152 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
52 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
| |||
226 | 232 | | |
227 | 233 | | |
228 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
229 | 241 | | |
230 | | - | |
| 242 | + | |
231 | 243 | | |
232 | 244 | | |
233 | 245 | | |
234 | 246 | | |
235 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
236 | 253 | | |
237 | 254 | | |
238 | 255 | | |
| |||
335 | 352 | | |
336 | 353 | | |
337 | 354 | | |
338 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
339 | 358 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
354 | 367 | | |
355 | | - | |
356 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | | - | |
| 141 | + | |
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| |||
307 | 308 | | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
358 | 359 | | |
359 | 360 | | |
360 | 361 | | |
361 | | - | |
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | 420 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
507 | 425 | | |
508 | 426 | | |
509 | 427 | | |
| |||
0 commit comments