-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Bind all reconcile loops with limited context.Context #4265
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
Conversation
|
Hi @omerap12. Thanks for your PR. I'm waiting for a fluid-cloudnative member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
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.
Sorry for my late reply. Thanks for making this and I have just one comment for the PR: Moving limited context.Context to func ReconcileInternal() looks better to me, because most reconciliation logic resides in it and all the runtime controllers reuse the function.
|
|
||
| // reconcile the implement | ||
| return r.ReconcileInternal(ctx) | ||
| return r.ReconcileInternal(reconcileCtx) |
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.
How about moving ctxWithTimeout, cancel := context.WithTimeout(ctx, reconcileTimeout) to func RuntimeReconciler.ReconcileInternal()? The changes now are only applied to AlluxioRuntime. Moving to func RuntimeReconciler.ReconcileInternal() can apply limited context.Context to all the Runtimes (e.g. JindoRuntime, JuiceFSRuntime, etc.) defined in Fluid.
|
Hey @TrafalgarZZZ , thanks for your review. Sure I'll adjust the code. |
@omerap12 I think 10-minute timeout duration is pretty enough for all the runtimes, so it's okay for all runtimes to have the same limited amount of time. |
Signed-off-by: Omer Aplatony <omerap12@gmail.com>
|
TrafalgarZZZ
left a comment
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.
/lgtm
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: TrafalgarZZZ The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |



Ⅰ. Describe what this PR does
Adds a context timeout mechanism to all controllers'
Reconcilefunctions.Ⅱ. Does this pull request fix one issue?
fixes #1144
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews