-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add determinism #145
Draft
jacobweinstock
wants to merge
20
commits into
tinkerbell:main
Choose a base branch
from
jacobweinstock:add-determinism
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add determinism #145
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By queuing requests per host we now provide deterministic behavior of calls. Signed-off-by: Jacob Weinstock <[email protected]>
Version was old. Signed-off-by: Jacob Weinstock <[email protected]>
Fixes issue where the task is not found. This was happening because I was creating the record in the DB in a goroutine and mocking the action to immediately fail. This caused the worker to complete and close before any record could be created. Signed-off-by: Jacob Weinstock <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #145 +/- ##
==========================================
- Coverage 81.33% 79.38% -1.95%
==========================================
Files 9 11 +2
Lines 466 587 +121
==========================================
+ Hits 379 466 +87
- Misses 74 104 +30
- Partials 13 17 +4
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The goroutine (in worker) dequeuing tasks was a blocking call. This meant that after there were no tasks in the queue, this dequeue call would sit waiting. This meant that when the rest of the worker exited this goroutine did not and was orphaned. Workers are per host id so depending on unique hosts that requested tasks this would grown and stay at that number. The resolution was to make the dequeue call non-blocking. Signed-off-by: Jacob Weinstock <[email protected]>
Fix tests, updating for linting issues, etc Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
Plumb these through to the cli flags. Also fixed a channel close so that when workers are done the goruntimes drops back down to original levels. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
The ingestor was single threaded. After adding metrics and watching the queues and processing happen, running the ingestor process with a max goroutine cap yielded better performance. The per ID queues filled up faster and allowed processing of BMC interactions faster. Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
This keeps the goroutines from growning uncontrollably. Signed-off-by: Jacob Weinstock <[email protected]>
This made processing significantly faster. Signed-off-by: Jacob Weinstock <[email protected]>
Update the metric server to handle slow loris attacks. Signed-off-by: Jacob Weinstock <[email protected]>
It was too big and made memory consumption way too high. Also, the typical/general use-case will be high number of hosts and low number of tasks that are requested close together. Signed-off-by: Jacob Weinstock <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add deterministic behavior for calls against a single host. By queuing requests per host we now provide deterministic behavior of calls.
Why is this needed
Fixes: #130
How Has This Been Tested?
How are existing users impacted? What migration steps/scripts do we need?
Checklist:
I have: