Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(base): wait for all chunked requests to arrive before continuing #4017

Merged

Commits on Dec 22, 2022

  1. fix(base): wait for all chunked requests to arrive before continuing

    Our previous approach of chunking document availability requests did not wait for all the chunks to finish before returning the results. The `debounceCollect` utility expects an observable that returns all results in one go, but because we returned a stream that would emit the chunks one-by-one as they arrived, we would only care about the first emission, which would not include the whole expected result set.
    
    This patch fixes the issue by reducing over each emission, successively add them to an array. The `reduce` operator will wait for the stream to finish before emitting a single reduced value.
    bjoerge committed Dec 22, 2022
    Configuration menu
    Copy the full SHA
    8b30aa2 View commit details
    Browse the repository at this point in the history