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

Refactor to update state when cache or SLURM changes #17

Merged

Conversation

ties
Copy link
Collaborator

@ties ties commented Aug 1, 2021

WIP
This was a fairly mechanical change but will require some testing before it really is done. Please check carefully that I got this right :). I felt this could be changed and would make the feature changes easier.

Before this commit the new stayrtr state was only recalculated
when the validated cache changed.

This commit refactors the update loop and separates the actual
update from pulling the updated cache. The update is triggered
when the SLURM file changes or when the validated cache changes.

Should fix cloudflare/gortr#95 and make
further changes that trigger an update when an update in the cache
has expired easier.

@ties ties changed the title Refactor to update state when cache or SLURM changes WIP: Refactor to update state when cache or SLURM changes Aug 1, 2021
@ties ties force-pushed the feature/separate-slurm-and-cache-update branch from acbf96e to 32cee50 Compare August 1, 2021 14:41
Before this commit the new stayrtr state was only recalculated
when the validated cache changed.

This commit refactors the update loop and separates the actual
update from pulling the updated cache. The update is triggered
when the SLURM file changes _or_ when the validated cache changes.

Should fix cloudflare/gortr#95 and make
further changes that trigger an update when an update in the cache
has expired easier.
@ties ties force-pushed the feature/separate-slurm-and-cache-update branch from 32cee50 to d11bc15 Compare August 1, 2021 14:45
@ties
Copy link
Collaborator Author

ties commented Aug 1, 2021

Running this and saving the metrics. Will see how it behaves. I do not run real routers though so that limits my testing.

@ties ties changed the title WIP: Refactor to update state when cache or SLURM changes Refactor to update state when cache or SLURM changes Aug 8, 2021
@ties
Copy link
Collaborator Author

ties commented Aug 8, 2021

Seems to have been stable over the last week. Will now run rtrmon against it using rtr protocol and track how it deviates from the same json endpoint that stayrtr reads.

@randomthingsandstuff randomthingsandstuff merged commit 4fbaebe into master Aug 16, 2021
@ties ties deleted the feature/separate-slurm-and-cache-update branch August 16, 2021 08:37
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.

slurm file only evaluated when validated cache changes
2 participants