Yuan Luo created YARN-12056:
-------------------------------

             Summary: Reorder application filters to avoid unnecessary locking
                 Key: YARN-12056
                 URL: https://issues.apache.org/jira/browse/YARN-12056
             Project: Hadoop YARN
          Issue Type: Improvement
          Components: resourcemanager
            Reporter: Yuan Luo
            Assignee: Yuan Luo


h2. Problem
* {{ClientRMService.getApplications}} evaluates application state and time 
filters before the tag filter. Applications rejected by the tag filter may 
incur unnecessary {{RMAppImpl}} read-lock acquisitions.
* The name filter runs after {{checkAccess}}, which may acquire the scheduler 
lock even when the application name does not match.

h2. Solution
* Move the tag filter before the state and time filters.
* Move the name filter before {{checkAccess}}.
* Preserve tag matching semantics, access control, result limits, and returned 
applications.
* Add regression coverage for early rejection, tag OR matching, and access 
checks for matching names.

h2. Validation
* Local JDK 17 and Maven Wrapper 3.9.15: reactor compilation passed. No native 
profile was enabled.
* {{TestClientRMService}}: 42 tests, 0 failures, 0 errors, 0 skipped.
* The two new regression tests failed as expected with the original production 
code: 2 failures, 0 errors, 0 skipped.
* Fresh Surefire XML and {{git diff --check}} verified. Community CI has not 
run. No benchmark result is claimed.

h2. Related PR




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to