Commit b9a90c2
committed
[adapters] Report batch write progress for Delta Lake output connector.
When a Delta Lake output connector writes a large batch, the write can take
a long time with no visible progress. Add a `batch_records_written` metric
that reports how many records have been written so far in the current batch,
giving users live feedback during long writes.
The metric is updated incrementally per chunk by each parallel write range
and resets to 0 after the batch is committed or on failure. Forward-progress
updates use `fetch_add` to atomically increment the shared counter, while
rollbacks on retry use `fetch_sub` to subtract exactly the failed attempt's
contribution. Batch boundaries and terminal failures use `store(0)` for a
clean reset.
The `Arc<AtomicU64>` counter is shared directly between the connector and
`OutputEndpointMetrics`, so metrics snapshots read live progress without any
extra synchronisation. The counter is only wired into metrics for connectors
that actually report progress (currently Delta Lake); other integrated
connectors receive the Arc but their metrics show `batch_records_written:
null` rather than a misleading `0`.
Signed-off-by: Swanand Mulay <73115739+swanandx@users.noreply.github.com>1 parent 48d51fb commit b9a90c2
File tree
8 files changed
+353
-17
lines changed- crates
- adapters
- benches
- src
- controller
- integrated/delta_table
- feldera-types/src
8 files changed
+353
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6137 | 6137 | | |
6138 | 6138 | | |
6139 | 6139 | | |
| 6140 | + | |
6140 | 6141 | | |
6141 | 6142 | | |
6142 | 6143 | | |
| |||
6181 | 6182 | | |
6182 | 6183 | | |
6183 | 6184 | | |
| 6185 | + | |
6184 | 6186 | | |
6185 | 6187 | | |
6186 | 6188 | | |
6187 | 6189 | | |
6188 | 6190 | | |
6189 | 6191 | | |
6190 | 6192 | | |
| 6193 | + | |
6191 | 6194 | | |
6192 | 6195 | | |
| 6196 | + | |
| 6197 | + | |
| 6198 | + | |
| 6199 | + | |
| 6200 | + | |
| 6201 | + | |
| 6202 | + | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
6193 | 6207 | | |
6194 | 6208 | | |
6195 | 6209 | | |
| |||
6221 | 6235 | | |
6222 | 6236 | | |
6223 | 6237 | | |
| 6238 | + | |
6224 | 6239 | | |
6225 | 6240 | | |
6226 | 6241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
624 | 624 | | |
625 | 625 | | |
626 | 626 | | |
| 627 | + | |
627 | 628 | | |
628 | 629 | | |
629 | 630 | | |
| |||
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
| 643 | + | |
642 | 644 | | |
643 | 645 | | |
644 | 646 | | |
| |||
2251 | 2253 | | |
2252 | 2254 | | |
2253 | 2255 | | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
2254 | 2265 | | |
2255 | 2266 | | |
2256 | 2267 | | |
2257 | 2268 | | |
2258 | 2269 | | |
2259 | 2270 | | |
| 2271 | + | |
2260 | 2272 | | |
2261 | 2273 | | |
2262 | 2274 | | |
| |||
2271 | 2283 | | |
2272 | 2284 | | |
2273 | 2285 | | |
| 2286 | + | |
2274 | 2287 | | |
2275 | 2288 | | |
2276 | 2289 | | |
| |||
2307 | 2320 | | |
2308 | 2321 | | |
2309 | 2322 | | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
2310 | 2327 | | |
2311 | 2328 | | |
2312 | 2329 | | |
| |||
2463 | 2480 | | |
2464 | 2481 | | |
2465 | 2482 | | |
| 2483 | + | |
2466 | 2484 | | |
2467 | 2485 | | |
2468 | 2486 | | |
2469 | 2487 | | |
2470 | | - | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
2471 | 2493 | | |
2472 | 2494 | | |
2473 | 2495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2261 | 2261 | | |
2262 | 2262 | | |
2263 | 2263 | | |
2264 | | - | |
| 2264 | + | |
2265 | 2265 | | |
2266 | 2266 | | |
2267 | 2267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
0 commit comments