kaijaytu opened a new pull request, #1116: URL: https://github.com/apache/yunikorn-core/pull/1116
Extract unreserveForApp() and cancelMatchingReservations() from the duplicated reservation cancellation logic in application.go and preemption.go. Both cancelReservations (tryRequiredNode path) and initWorkingState (preemption path) shared the same lock-aware unreserve pattern that branches on whether the reservation belongs to the calling app. Consolidate into a single predicate-based method that both call sites now use with their own filter logic. ### Type of change - [x] Refactoring ### Jira issue Jira ID : https://issues.apache.org/jira/browse/YUNIKORN-3325 - [x] I have created a Jira issue for this pull request. - [x] The Jira ID is part of the title of this pull request. ### AI Tooling - [x] The PR includes the phrase "Generated by GitHub Copilot (Claude Opus 4.6)", where <tool> is the name of the AI tool used. - [x] My use of AI contributions follows the ASF legal policy. Check https://www.apache.org/legal/generative-tooling.html for details. ### How has this been tested? - [x] New unit tests were added to cover new or changed code paths. - [x] `make test_all` was run, and no failures reported. ### Questions: - The change does not need documentation. - There are no breaking changes. - The license files do not need to be updated. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
