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

support for configuring max concurrent batches in fetcher #612

Merged
merged 5 commits into from
Apr 16, 2021

Conversation

nickhudkins
Copy link
Contributor

added a new config param maxConcurrentBatches to configure
the max number of batched IDs that can be fetched concurrently by fetcher.
not specifying any value for this param will fallback to the existing
behaviour of running all batches concurrently.


val groupedBatches: Iterator[TraversableOnce[Vector[Any]]] = ctx.fetcher.config.maxConcurrentBatchesConfig match {
case Some(size) ⇒ groupedIds.grouped(size)
case None ⇒ Iterator(groupedIds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are now using the =>. Can we change them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaced! I also updated .scalafmt.conf so no one has to ever think about it!

@nickhudkins nickhudkins force-pushed the config-fetcher-concurrency branch from a1cb696 to bffb820 Compare April 14, 2021 13:34
Copy link
Contributor

@yanns yanns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

vivekdhayaal and others added 2 commits April 14, 2021 10:02
added a new config param maxConcurrentBatches to configure
the max number of batched IDs that can be fetched concurrently by fetcher.
not specifying any value for this param will fallback to the existing
behaviour of running all batches concurrently.
@nickhudkins nickhudkins force-pushed the config-fetcher-concurrency branch from bffb820 to 4d96be6 Compare April 14, 2021 14:02
@yanns yanns merged commit d823b99 into master Apr 16, 2021
@yanns yanns deleted the config-fetcher-concurrency branch April 16, 2021 16:54
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.

3 participants