Move segment optimization in sub function, cancel in single place#6557
Merged
agourlay merged 3 commits intoalways-handle-cancellation-for-interrupted-optimizationsfrom May 20, 2025
Conversation
8a4e556 to
96539be
Compare
agourlay
approved these changes
May 20, 2025
Member
agourlay
left a comment
There was a problem hiding this comment.
Not easy to review TBH :)
I could not find logic changes 👍
a6ba129
into
always-handle-cancellation-for-interrupted-optimizations
16 checks passed
agourlay
added a commit
that referenced
this pull request
May 20, 2025
* Always run cancelletatiob handle for interrupted optimizations * Stick to one way of checking cancelation * Move segment optimization in sub function, cancel in single place (#6557) * Move segment optimization into separate function, cancel in single place * Don't use owned lock * Unify cancellation check --------- Co-authored-by: Tim Visée <tim+github@visee.me>
generall
pushed a commit
that referenced
this pull request
May 22, 2025
* Always run cancelletatiob handle for interrupted optimizations * Stick to one way of checking cancelation * Move segment optimization in sub function, cancel in single place (#6557) * Move segment optimization into separate function, cancel in single place * Don't use owned lock * Unify cancellation check --------- Co-authored-by: Tim Visée <tim+github@visee.me>
n0x29a
pushed a commit
that referenced
this pull request
May 23, 2025
* Always run cancelletatiob handle for interrupted optimizations * Stick to one way of checking cancelation * Move segment optimization in sub function, cancel in single place (#6557) * Move segment optimization into separate function, cancel in single place * Don't use owned lock * Unify cancellation check --------- Co-authored-by: Tim Visée <tim+github@visee.me>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #6549
Extract the segment building, optimization and change propagation logic into a separate function. This way we can handle cancellation on all errors in a single place.
While this might make the optimization logic a little bit more complex to look at, I do think it's worth it for consistent cancellation handling.
This contains no logic changes, other than cancelling properly on all error paths for segment optimization.
All Submissions:
devbranch. Did you create your branch fromdev?New Feature Submissions:
cargo +nightly fmt --allcommand prior to submission?cargo clippy --all --all-featurescommand?