-
Notifications
You must be signed in to change notification settings - Fork 41
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
[COR-255] CoreDB operator: don't block while waiting for pod to be ready #118
Conversation
} | ||
if !is_pod_ready().matches_object(Some(&primary_pod.unwrap())) { | ||
debug!("Did not find primary pod is ready"); | ||
return Ok(Action::requeue(Duration::from_secs(1))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is 1 second wait hardcoded, but I think it ought to be an exponential backoff, up to X seconds maximum backoff time. However, I do not know how to get the previous queue duration yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think they are writing to 'status', that could be a future improvement to prevent checking on stuck pods every second
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boom!
* Derive default * Remove topology from status * Don't derive default where it doesn't work * fmt * Use stable for clippy
Instead, return to the reconciler loop with a short wait.