Commit 7f1b811
authored
## Description
Currently, if `first_checkpoint` is configured and a pipeline with no
watermark row is added to the indexer, it'll essentially stall since the
pipeline's committer task creates a default watermark with
checkpoint_hi_inclusive = 0 and waits for this checkpoint. This prevents
someone from using `first_checkpoint` to arbitrarily seed the starting
point of pipelines for the first time. Consequently, indexer operators
have to manually update the watermarks table to set a starting point
that isn't 0.
In this PR, the indexer is now responsible for determining the
`next_checkpoint` to commit and make watermark updates for each
pipeline. In practice, for a valid `first_checkpoint`
(`next_checkpoint`), sequential pipelines will wait to commit the next
processed checkpoint after its watermark, while concurrent pipelines
will start from the same `first_checkpoint`.
Meanwhile, the pipeline tasks initialize a default watermark variable
for the logger, but in practice will always be overwritten by the next
processed checkpoint for metrics and other reporting.
## Test plan
- Unit tests for the behavior above
- commit_watermark and sequential committer tests
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
## Description
Describe the changes or additions included in this PR.
## Test plan
How did you test the new or updated feature?
---
## Release notes
Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.
For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.
- [ ] Protocol:
- [ ] Nodes (Validators and Full nodes):
- [ ] gRPC:
- [ ] JSON-RPC:
- [ ] GraphQL:
- [ ] CLI:
- [ ] Rust SDK:
1 parent 0cddd6b commit 7f1b811
File tree
10 files changed
+750
-230
lines changed- crates/sui-indexer-alt-framework/src
- mocks
- pipeline
- concurrent
- sequential
10 files changed
+750
-230
lines changedLarge diffs are not rendered by default.
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
Lines changed: 60 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | | - | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
| |||
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
| |||
132 | 136 | | |
133 | 137 | | |
134 | 138 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
140 | 149 | | |
141 | 150 | | |
142 | 151 | | |
| |||
160 | 169 | | |
161 | 170 | | |
162 | 171 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
169 | 181 | | |
170 | 182 | | |
171 | 183 | | |
| |||
174 | 186 | | |
175 | 187 | | |
176 | 188 | | |
177 | | - | |
178 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
179 | 194 | | |
180 | 195 | | |
181 | 196 | | |
| |||
350 | 365 | | |
351 | 366 | | |
352 | 367 | | |
353 | | - | |
354 | | - | |
355 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
356 | 371 | | |
357 | 372 | | |
358 | 373 | | |
| |||
440 | 455 | | |
441 | 456 | | |
442 | 457 | | |
443 | | - | |
444 | | - | |
445 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
446 | 462 | | |
447 | 463 | | |
448 | 464 | | |
| |||
Lines changed: 28 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
76 | 73 | | |
77 | 74 | | |
78 | 75 | | |
| |||
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
87 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | | - | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
| 363 | + | |
368 | 364 | | |
369 | 365 | | |
370 | 366 | | |
| |||
376 | 372 | | |
377 | 373 | | |
378 | 374 | | |
379 | | - | |
| 375 | + | |
380 | 376 | | |
381 | 377 | | |
382 | 378 | | |
| |||
387 | 383 | | |
388 | 384 | | |
389 | 385 | | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
| 386 | + | |
395 | 387 | | |
396 | 388 | | |
397 | 389 | | |
| |||
405 | 397 | | |
406 | 398 | | |
407 | 399 | | |
408 | | - | |
| 400 | + | |
409 | 401 | | |
410 | 402 | | |
411 | 403 | | |
| |||
419 | 411 | | |
420 | 412 | | |
421 | 413 | | |
422 | | - | |
| 414 | + | |
423 | 415 | | |
424 | 416 | | |
425 | 417 | | |
| |||
433 | 425 | | |
434 | 426 | | |
435 | 427 | | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | 428 | | |
441 | | - | |
| 429 | + | |
442 | 430 | | |
443 | 431 | | |
444 | 432 | | |
| |||
448 | 436 | | |
449 | 437 | | |
450 | 438 | | |
451 | | - | |
452 | | - | |
| 439 | + | |
| 440 | + | |
453 | 441 | | |
454 | 442 | | |
455 | 443 | | |
456 | 444 | | |
457 | 445 | | |
458 | | - | |
| 446 | + | |
459 | 447 | | |
460 | 448 | | |
461 | 449 | | |
| |||
469 | 457 | | |
470 | 458 | | |
471 | 459 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 460 | + | |
477 | 461 | | |
478 | 462 | | |
479 | 463 | | |
| |||
490 | 474 | | |
491 | 475 | | |
492 | 476 | | |
493 | | - | |
494 | | - | |
| 477 | + | |
| 478 | + | |
495 | 479 | | |
496 | 480 | | |
497 | 481 | | |
| |||
504 | 488 | | |
505 | 489 | | |
506 | 490 | | |
507 | | - | |
| 491 | + | |
508 | 492 | | |
509 | 493 | | |
510 | 494 | | |
| |||
515 | 499 | | |
516 | 500 | | |
517 | 501 | | |
518 | | - | |
519 | | - | |
| 502 | + | |
520 | 503 | | |
521 | 504 | | |
522 | 505 | | |
| |||
529 | 512 | | |
530 | 513 | | |
531 | 514 | | |
532 | | - | |
533 | | - | |
| 515 | + | |
| 516 | + | |
534 | 517 | | |
535 | 518 | | |
536 | 519 | | |
| |||
543 | 526 | | |
544 | 527 | | |
545 | 528 | | |
546 | | - | |
| 529 | + | |
547 | 530 | | |
548 | 531 | | |
549 | 532 | | |
| |||
0 commit comments