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 issues with state management in slow situations (SOFIE-3803) #210

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nytamin
Copy link
Contributor

@nytamin nytamin commented Feb 18, 2025

About Me

This pull request is posted on behalf of the NRK.

Type of Contribution

This is a:

Bug fix

Current Behavior

Premise:

  • Package Manager has quite a lot (1000) of expectations to handle
  • An external service is handling requests really slow (several seconds)
  • Let's say that all expecations are in NEW state

Package Manager starts to evaluate the expectations in batches, but because the handling is slow, it can take a LONG TIME to evaluate the states.
This means that it'll take quite a long time before an expectation reaches READY and PM will start working on it.
Note that PM will also only start working on 1 expectation (per worker) going back to evaluating all the states again.

New Behavior

When evaluating the states: After a certain amount of time, PM will skip ahead to evaluate the next state.
This means that in a slow situation, PM will get around to process READY expectations faster.

Testing Instructions

  • Since the "slow" situation can be hard to get in, normal regression testing should do.

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

This is to help with a situation where a check is really slow, to avoid expectationManager spending too much time evaluating a single state
This is to even out the evaluations of expectations in the case where we skip evaluating states.
@nytamin nytamin requested a review from a team February 18, 2025 14:02
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.

1 participant