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(scheduler): Increase event hub buffer inline with other components #5406

Merged
merged 3 commits into from Mar 7, 2024

Conversation

sakoush
Copy link
Member

@sakoush sakoush commented Mar 7, 2024

What this PR does / why we need it:

This change increases the pending queues in the event hub (coordinator) for server and model events delivery. There is going to be a tradeoff, with a bigger buffer we allow more work to pile up if the producer is faster than the consumer. However in practice setting it to 1000 has worked fined in other cases, check here.

It also reduces the risk of deadlocks as producers will block otherwise when trying to publish on a queue that it full.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

  • changing all pending queues sizes to 1000
  • fix a missing unlock call from reviewing code around this area

@sakoush sakoush requested a review from lc525 as a code owner March 7, 2024 16:36
@sakoush sakoush added the v2 label Mar 7, 2024
Copy link
Member

@lc525 lc525 left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -588,6 +588,7 @@ func (p *IncrementalProcessor) modelUpdate(modelName string) error {
logger.Debugf("sync: No server - removing for %s", modelName)
if err := p.removeRouteForServerInEnvoyCache(modelName); err != nil {
logger.WithError(err).Errorf("Failed to remove model route from envoy %s", modelName)
p.modelStore.UnlockModel(modelName)
Copy link
Member

Choose a reason for hiding this comment

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

nice catch!

Copy link
Member

Choose a reason for hiding this comment

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

we might be able to convert this into a defer, as we always unlock before return

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like we need to release the model lock before running further logic at the end of this method

@sakoush sakoush merged commit 490c031 into SeldonIO:v2 Mar 7, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants