Skip to content

Commit

Permalink
introduce new IncrementalPublisher class (#3894)
Browse files Browse the repository at this point in the history
extracted from #3886

depends on #3903

more refactors from the without-branching branch, a bit more fundamental
than #3891

[set as patch release because it does have an observable effect on the
number of payloads, see below]

= iterate only through completed items
= remove extra ticks by making the publisher manage changes to its state
synchronously.
= use children array instead of promises to manage hierarchy
= have IncrementalPublisher instantiate new IncrementalDataRecords

= The new publisher sometimes cause an empty `{ hasNext: false }` to be
emitted. In particular, because the publisher is faster than it was, it
may emit a stream result before the stream's asynchronous iterator has
completed.
= The new publisher may sometimes reduce the number of `{ hasNext: false
}` records that are emitted. For example, when errors on the initial
result filter all subsequent results, this now happens synchronously,
and so the publisher knows immediately that there are no subsequent
results, such that there is no need for an empty final payload.
  • Loading branch information
yaacovCR committed Jun 17, 2023
1 parent 04e948b commit d766c8e
Show file tree
Hide file tree
Showing 3 changed files with 454 additions and 310 deletions.

0 comments on commit d766c8e

Please sign in to comment.