-
Notifications
You must be signed in to change notification settings - Fork 164
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
Reconciler: improvements for processing of async operations #3311
Conversation
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.
Stylistic nits otherwise fine.
Note that since this is only in libs, it has no effect on EVE until I bring these changes to pillar in the next PR. So it does not make much sense to wait for eden. |
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.
Kick off regression tests in parallel with review.
Signed-off-by: Milan Lenco <milan@zededa.com>
Signed-off-by: Milan Lenco <milan@zededa.com>
Async ops that finalize *during* reconciliation are left to be processed in the next reconciliation run. This prevents race-conditions and simplifies the reconciliation algorithm. Signed-off-by: Milan Lenco <milan@zededa.com>
ea56afb
to
b05ff57
Compare
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.
Do you think it makes sense to split reconciler_test.go into multiple files grouped by functionality?
WaitForAsyncOps func() | ||
} | ||
|
||
// CancelFunc is used to cancel all or only some asynchronously running operations. | ||
type CancelFunc func(cancelForItem func(ref dg.ItemRef) bool) |
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.
Why don't we want to use semantics of Cancel function defined by context?
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.
Previously I used that (see the diff) but I needed to add cancelForItem
argument.
3 commits in this PR related to reconciliation of async operations:
in the next reconciliation run (some race conditions were found during zedrouter testing and this way they can be easily avoided)
This updates
libs/reconciler
package. Changes made here will be propagated to pillar in the next PR together with some zedrouter patches.