Commit 3179ddb
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 counter is owned by encoder, e.g. DeltaTableWriter and registered with the
controller's OutputEndpointMetrics via register_batch_progress_counter()
during construction. To make this possible, add_output() is called before
encoder creation so the metrics slot exists when the connector is built.
Connectors that don't register a counter show batch_records_written: null.
Signed-off-by: Swanand Mulay <73115739+swanandx@users.noreply.github.com>1 parent 49913a8 commit 3179ddb
File tree
7 files changed
+424
-73
lines changed- crates
- adapters/src
- controller
- integrated/delta_table
- feldera-types/src
- docs.feldera.com/docs/operations
7 files changed
+424
-73
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
| 1851 | + | |
| 1852 | + | |
| 1853 | + | |
| 1854 | + | |
1837 | 1855 | | |
1838 | 1856 | | |
1839 | 1857 | | |
| |||
6137 | 6155 | | |
6138 | 6156 | | |
6139 | 6157 | | |
6140 | | - | |
6141 | | - | |
6142 | | - | |
6143 | | - | |
6144 | | - | |
6145 | | - | |
6146 | | - | |
6147 | | - | |
6148 | | - | |
6149 | | - | |
6150 | | - | |
6151 | | - | |
6152 | | - | |
6153 | | - | |
6154 | | - | |
6155 | | - | |
| 6158 | + | |
| 6159 | + | |
| 6160 | + | |
| 6161 | + | |
| 6162 | + | |
| 6163 | + | |
| 6164 | + | |
| 6165 | + | |
6156 | 6166 | | |
6157 | | - | |
6158 | | - | |
6159 | | - | |
6160 | | - | |
6161 | | - | |
6162 | | - | |
6163 | | - | |
| 6167 | + | |
| 6168 | + | |
| 6169 | + | |
| 6170 | + | |
| 6171 | + | |
| 6172 | + | |
| 6173 | + | |
| 6174 | + | |
| 6175 | + | |
| 6176 | + | |
| 6177 | + | |
| 6178 | + | |
| 6179 | + | |
| 6180 | + | |
| 6181 | + | |
| 6182 | + | |
| 6183 | + | |
6164 | 6184 | | |
6165 | | - | |
6166 | | - | |
6167 | | - | |
6168 | | - | |
6169 | | - | |
6170 | | - | |
| 6185 | + | |
| 6186 | + | |
| 6187 | + | |
| 6188 | + | |
| 6189 | + | |
| 6190 | + | |
| 6191 | + | |
6171 | 6192 | | |
6172 | | - | |
6173 | | - | |
6174 | | - | |
6175 | | - | |
6176 | | - | |
6177 | | - | |
6178 | | - | |
6179 | | - | |
6180 | | - | |
6181 | | - | |
6182 | | - | |
6183 | | - | |
6184 | | - | |
6185 | | - | |
6186 | | - | |
6187 | | - | |
6188 | | - | |
6189 | | - | |
6190 | | - | |
6191 | | - | |
| 6193 | + | |
| 6194 | + | |
| 6195 | + | |
| 6196 | + | |
| 6197 | + | |
| 6198 | + | |
6192 | 6199 | | |
6193 | | - | |
6194 | | - | |
| 6200 | + | |
| 6201 | + | |
| 6202 | + | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
| 6207 | + | |
| 6208 | + | |
| 6209 | + | |
| 6210 | + | |
| 6211 | + | |
| 6212 | + | |
| 6213 | + | |
| 6214 | + | |
| 6215 | + | |
| 6216 | + | |
| 6217 | + | |
| 6218 | + | |
| 6219 | + | |
| 6220 | + | |
| 6221 | + | |
| 6222 | + | |
| 6223 | + | |
| 6224 | + | |
| 6225 | + | |
| 6226 | + | |
6195 | 6227 | | |
6196 | 6228 | | |
6197 | 6229 | | |
| |||
6215 | 6247 | | |
6216 | 6248 | | |
6217 | 6249 | | |
6218 | | - | |
6219 | | - | |
6220 | | - | |
6221 | | - | |
6222 | | - | |
6223 | | - | |
6224 | | - | |
6225 | | - | |
6226 | 6250 | | |
6227 | 6251 | | |
6228 | 6252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
726 | 741 | | |
727 | 742 | | |
728 | 743 | | |
| |||
2251 | 2266 | | |
2252 | 2267 | | |
2253 | 2268 | | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
2254 | 2278 | | |
2255 | 2279 | | |
2256 | 2280 | | |
| |||
2271 | 2295 | | |
2272 | 2296 | | |
2273 | 2297 | | |
| 2298 | + | |
2274 | 2299 | | |
2275 | 2300 | | |
2276 | 2301 | | |
| |||
2307 | 2332 | | |
2308 | 2333 | | |
2309 | 2334 | | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
2310 | 2339 | | |
2311 | 2340 | | |
2312 | 2341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
0 commit comments