Commit 00d66cc
compute: import published indexes as a shared arrangement
`ArrangementFlavor` gains a `SharedTrace` variant carrying arrangements backed by
`TraceFrontier<SharedTraceHandle>`, and `import_index_shared` constructs it on the
interactive runtime instead of reading the local `TraceManager`, which holds
nothing there. Because the shared handle shares the `RowRow`/`Err` batch and
cursor types of a maintenance `TraceAgent`, the variant flows through the same
generic bodies as `Trace`, so a downstream `Get` receives a real arrangement with
its key and permutation intact rather than a collection the plan has to
re-derive. Joins, delta joins, thresholds, and hydration logging gain the
corresponding arm.
The import is a static snapshot at `as_of`, bounded one step past it rather than
by `self.until`. Interactive work is single-time, so the capability must drop once
the shared trace seals past `as_of` for the one-shot result to complete, and an
unbounded `until` never gets there. An `as_of` at `Timestamp::MAX` yields the
empty bound, which is the right reading of "the final state".
The read hold is the returned `Arranged`'s own trace rather than a separate token,
so consumers can downgrade it as their frontiers advance. A token nobody
downgrades would be a floor under every hold that is downgraded, because the
publisher forwards the meet.
The two export paths reject `SharedTrace` as unreachable. Only the interactive
runtime produces the variant, and its exports are freshly rendered query outputs,
never a re-export of an import.
Both `import_index_shared` and the variant are reachable only when a runtime holds
the `Interactive` role, which nothing constructs yet.
The two `sharing` tests that build this variant return here, along with the
`consolidate_capture` helper they share. `render`'s tests move out of line to
`render/tests.rs`, per the convention in `src/compute/AGENTS.md`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent d3a7b3d commit 00d66cc
7 files changed
Lines changed: 1627 additions & 47 deletions
File tree
- src/compute/src
- render
- join
- sharing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
233 | 234 | | |
234 | 235 | | |
235 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
236 | 254 | | |
237 | 255 | | |
238 | 256 | | |
| |||
267 | 285 | | |
268 | 286 | | |
269 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
270 | 292 | | |
271 | 293 | | |
272 | 294 | | |
| |||
350 | 372 | | |
351 | 373 | | |
352 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
353 | 387 | | |
354 | 388 | | |
355 | 389 | | |
| |||
395 | 429 | | |
396 | 430 | | |
397 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
398 | 443 | | |
399 | 444 | | |
400 | 445 | | |
| |||
404 | 449 | | |
405 | 450 | | |
406 | 451 | | |
| 452 | + | |
407 | 453 | | |
408 | 454 | | |
409 | 455 | | |
| |||
419 | 465 | | |
420 | 466 | | |
421 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
422 | 473 | | |
423 | 474 | | |
424 | 475 | | |
| |||
435 | 486 | | |
436 | 487 | | |
437 | 488 | | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
438 | 494 | | |
439 | 495 | | |
440 | 496 | | |
| |||
565 | 621 | | |
566 | 622 | | |
567 | 623 | | |
568 | | - | |
569 | | - | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
570 | 627 | | |
571 | 628 | | |
572 | 629 | | |
| |||
582 | 639 | | |
583 | 640 | | |
584 | 641 | | |
585 | | - | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
586 | 645 | | |
587 | 646 | | |
588 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
322 | 326 | | |
323 | 327 | | |
324 | 328 | | |
| |||
400 | 404 | | |
401 | 405 | | |
402 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
403 | 433 | | |
404 | 434 | | |
405 | 435 | | |
| |||
743 | 773 | | |
744 | 774 | | |
745 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
746 | 787 | | |
747 | 788 | | |
748 | 789 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| 199 | + | |
| 200 | + | |
198 | 201 | | |
199 | 202 | | |
200 | 203 | | |
| |||
238 | 241 | | |
239 | 242 | | |
240 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
241 | 248 | | |
242 | 249 | | |
243 | 250 | | |
| |||
421 | 428 | | |
422 | 429 | | |
423 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
424 | 447 | | |
425 | 448 | | |
426 | 449 | | |
427 | 450 | | |
428 | 451 | | |
429 | 452 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
| 453 | + | |
438 | 454 | | |
439 | 455 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
448 | 460 | | |
449 | 461 | | |
450 | 462 | | |
451 | 463 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
460 | 476 | | |
461 | 477 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
470 | 482 | | |
471 | 483 | | |
472 | 484 | | |
| |||
0 commit comments