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

[COR-255] CoreDB operator: don't block while waiting for pod to be ready #118

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

sjmiller609
Copy link
Contributor

Instead, return to the reconciler loop with a short wait.

}
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)));
Copy link
Contributor Author

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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

@sjmiller609 sjmiller609 changed the title In the CoreDB operator, don't block while waiting for pod to be ready CoreDB operator: don't block while waiting for pod to be ready Feb 15, 2023
@sjmiller609 sjmiller609 marked this pull request as ready for review February 15, 2023 19:17
@sjmiller609 sjmiller609 changed the title CoreDB operator: don't block while waiting for pod to be ready [COR-255] CoreDB operator: don't block while waiting for pod to be ready Feb 15, 2023
@sjmiller609 sjmiller609 enabled auto-merge (squash) February 15, 2023 19:20
Copy link
Contributor

@ianstanton ianstanton left a comment

Choose a reason for hiding this comment

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

Boom!

@sjmiller609 sjmiller609 merged commit 558a0cc into main Feb 15, 2023
@sjmiller609 sjmiller609 deleted the dont-wait branch February 15, 2023 19:41
sjmiller609 added a commit that referenced this pull request Dec 5, 2023
* Derive default

* Remove topology from status

* Don't derive default where it doesn't work

* fmt

* Use stable for clippy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants