Commit 3c7da54
committed
storage: infrastructure for independent source output streams
This PR puts in the basis for allowing a source implementation to
produce an independent DD collection per output.
The situation before this PR was that the `SourceRender` trait required
a single, multiplexed DD collection to be produced, of type `(usize,
D)`, where the `usize` designated the output. Since all outputs were
multiplexed, a single frontier had to describe their overall progress,
which described the "slowest" one. This is generally fine when all
outputs more or less march forwards together but it's not ok when a new
subsource is added to a source that has otherwise been running for a
while. In this situation the upper frontier of the multiplexed
collection would necessarily have to stay stuck until the new subsource
finished its snapshot and caught up with the other ones, making the
previously healthy sources unavailable for all this time.
This PR fixes this by requiring a `BTreeMap<GlobalId, Collection>`
output type from source implementations. This way each subsource can be
driven independently and a new subsource can be added without imposing a
frontier stall to the previously ingested subsources.
This PR does not change any of the source implementations to take
advantage of this new interface, since that would create a giant PR.
Instead, this only changes the interface and the fallout of all the
changes in the various generic parts of the pipeline. Follow up PRs will
be done that target individual source implementation and change them to
be directly produce multiple collections.
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>1 parent ff4b6fd commit 3c7da54
File tree
18 files changed
+412
-523
lines changed- src
- storage-types/src
- storage/src
- metrics
- render
- sink
- source
- generator
18 files changed
+412
-523
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | 144 | | |
182 | 145 | | |
183 | 146 | | |
| |||
278 | 241 | | |
279 | 242 | | |
280 | 243 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 244 | | |
290 | 245 | | |
291 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
574 | | - | |
| 574 | + | |
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| |||
0 commit comments