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

feat: rework anchor worker scaling algorithm #17

Merged

Conversation

smrz2001
Copy link
Collaborator

@smrz2001 smrz2001 commented Jul 6, 2023

Instead of using just the number of batches in flight, this code now uses actual CD manager jobs and states.

This prevents new jobs from being spuriously created if, for any reason, anchor workers could not be started. This could happen if there's a deployment in progress, there's a bug in the CD manager starting anchor workers, there's a bug in the anchor worker that causes it to crash, etc.

@smrz2001 smrz2001 self-assigned this Jul 6, 2023
@linear
Copy link

linear bot commented Jul 6, 2023

RES-1113 Rework anchor worker scaling algorithm

The current algorithm could spawn a large number of workers because it doesn't take into account how many workers are truly in progress.

Each time it loops back to check for the size of the batch queue, it could spawn new workers even if the previously counted batch events had not even started being serviced yet.

Copy link
Collaborator

@stephhuynh18 stephhuynh18 left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from feature/res-1111-clean-up-contexts to develop July 9, 2023 18:49
@smrz2001 smrz2001 force-pushed the feature/res-1113-rework-anchor-worker-scaling-algorithm branch from a6769d6 to af11655 Compare July 9, 2023 18:50
@smrz2001 smrz2001 merged commit aec9d04 into develop Jul 10, 2023
1 check passed
@smrz2001 smrz2001 deleted the feature/res-1113-rework-anchor-worker-scaling-algorithm branch July 10, 2023 20:46
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