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

Remove prefetch from pubsub source #107

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

istreeter
Copy link
Contributor

The prefetchN in the pubsub source was complicated because:

  1. The preceding parEvalMapUnordered effectively does a pre-fetch already
  2. PrefetchN works in chunks, so there was a danger our Source was pre-fetching more batches from pubsub than expected.
  3. It gave a double-meaning to the parallelPullCount config param, because the same param got used in two places. Which is just confusing.

Moreover, I found it just wasn't needed. The input rate of this Source is high enough without the prefetch.

The `prefetchN` in the pubsub source was complicated because:

1. The preceding `parEvalMapUnordered` effectively does a pre-fetch
   already
2. PrefetchN works in chunks, so there was a danger our Source was
   pre-fetching more batches from pubsub than expected.
3. It gave a double-meaning to the `parallelPullCount` config param,
   because the same param got used in two places.  Which is just
   confusing.

Moreover, I found it just wasn't needed.  The input rate of this Source
is high enough without the prefetch.
@istreeter istreeter merged commit e54eb6d into develop Jan 13, 2025
1 check passed
@istreeter istreeter deleted the remove-pubsub-prefetch branch January 13, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants