Commit e0904fa
authored
Synchronize Cayenne partition commits across partitions (spiceai#10125) (spiceai#10819)
* Add CayenneStagedAppend two-phase commit lifecycle (spiceai#10125)
* Add commit_compaction_in_txn catalog primitive (spiceai#10125)
* Tighten CayenneTableProvider scan() lock against barrier (spiceai#10125)
* Extract PreparedOverwrite lifecycle from write_all_overwrite (spiceai#10125)
* Add CayennePartitionedInsertStrategy for atomic overwrite (spiceai#10125)
* Add top-level partitioned-commit WAL format (spiceai#10125)
* Extend CayennePartitionedInsertStrategy to atomic append (spiceai#10125)
* Address Copilot review comments — atomic WAL write, S3 fallback (spiceai#10125)
- partitioned_wal: write WAL via tempfile + fsync + atomic rename + parent
dir fsync so a crash mid-write can never leave an unparseable file that
read_all_in would skip.
- partitioned_insert_strategy: skip the top-level partitioned WAL for
S3-backed table roots (tokio::fs would attempt local paths like
`s3:/bucket/...` and fail). Per-partition staging WAL still anchors
single-partition recovery on S3; the cross-partition set anchor is
deferred until the WAL grows object-store IO.
- partitioned_insert_strategy: module docs now describe the actual append
coordination flow (CayennePartitionedAppendSink) instead of the stale
"falls through to DefaultInsertStrategy" wording.
- staging_wal / overwrite: rollback paths hold the per-table write guard
for the full cleanup so a concurrent writer cannot observe leftover
staging state mid-rollback.
* Drop stringified-column shortcut in partition-expr compilation (spiceai#10125)
create_partition_physical_exprs previously tried an unqualified column
lookup using `other.to_string()` for any non-Column partition expression
before falling back to compiling the real expression. If the input schema
contained a column whose name happened to match the debug form of a
derived partition expression, the shortcut would silently succeed and
route partitioning through the wrong physical expression — incorrect
partition keys, incorrect commit groupings.
Compile bare `Expr::Column` partitions via unqualified-name lookup as
before; all other expressions are compiled as-is. No string-form fallback.
Addresses Copilot comment on PR spiceai#10819.
Also restages fmt-only fixes left from the trunk merge.
* Add backticks around DataFusion in builder.rs test doc
clippy::doc_markdown caught this on the test-clippy step (the lib step
clears with the same rule, but the test build picks up a different cfg
set). Pre-existing on trunk; fixing here so the PR branch's lint is
green.
* Update stats edge-case test to assert post-merge aggregation
persist_table_stats now merges the current write's accumulator with the
existing metastore aggregate (current trunk behavior, see spiceai#10818). The
test expectations were locked to the pre-merge "latest-write-only" path
with a TBD note for when aggregation lands — refresh them to the merged
shape: num_rows = 3 + 2 = 5, min/max span both batches. Renamed the test
+ doc to match.1 parent 33e498d commit e0904fa
21 files changed
Lines changed: 3470 additions & 272 deletions
File tree
- crates
- cayenne
- benches
- src
- provider
- delete
- sink
- tests
- runtime
- src
- dataaccelerator/cayenne
- datafusion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 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 | + | |
0 commit comments