Skip to content

YARN-11992. Preserve reservation result and node during multi-node allocation - #8752

Open
luoyuan3471 wants to merge 1 commit into
apache:trunkfrom
luoyuan3471:YARN-11992
Open

luoyuan3471 wants to merge 1 commit into
apache:trunkfrom
luoyuan3471:YARN-11992

Conversation

@luoyuan3471

@luoyuan3471 luoyuan3471 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description of PR

Multi-node allocation can reserve a container on an earlier candidate, then overwrite the allocation result when a later node is skipped during the node precheck. When candidate traversal ends, the earlier reservation is discarded or may be completed against the wrong node.

This change tracks the latest reservation together with the node that produced it, completes that reservation after later node-level skips, and returns successful allocations directly so they cannot fall back to a stale reservation.

JIRA: https://issues.apache.org/jira/browse/YARN-11992

How was this patch tested?

  • Added focused regression coverage in TestRegularContainerAllocator for preserving an earlier reservation after a later candidate is skipped, completing the reservation on its original node, and avoiding fallback to a stale reservation when doAllocation does not allocate.
  • TestRegularContainerAllocator: 3 tests passed.
  • TestCapacitySchedulerMultiNodes: 8 tests passed;

@luoyuan3471

Copy link
Copy Markdown
Contributor Author

Hi @slfan1989, could you please take a look when you have time? This fixes a multi-node reservation issue in RegularContainerAllocator, where a later skipped candidate can overwrite an earlier reservation result or cause it to be completed against the wrong node. The change is closely related to the candidate precheck flow updated in YARN-11798 (#7516), and includes focused regression tests. Thanks!

@luoyuan3471 luoyuan3471 reopened this Oct 12, 2026
@luoyuan3471
luoyuan3471 force-pushed the YARN-11992 branch 2 times, most recently from 130cc84 to 462cf6a Compare October 13, 2026 02:29
@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 14m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 1s codespell was not available.
+0 🆗 detsecrets 0m 1s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 💚 mvninstall 99m 22s trunk passed
+1 💚 compile 1m 27s trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 compile 1m 31s trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 checkstyle 1m 29s trunk passed
+1 💚 mvnsite 1m 34s trunk passed
+1 💚 javadoc 1m 22s trunk passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javadoc 1m 17s trunk passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 spotbugs 2m 42s trunk passed
+1 💚 shadedclient 30m 48s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 1m 2s the patch passed
+1 💚 compile 0m 57s the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javac 0m 57s the patch passed
+1 💚 compile 0m 59s the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 javac 0m 59s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 51s the patch passed
+1 💚 mvnsite 1m 2s the patch passed
+1 💚 javadoc 0m 48s the patch passed with JDK Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu
+1 💚 javadoc 0m 47s the patch passed with JDK Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
+1 💚 spotbugs 2m 17s the patch passed
+1 💚 shadedclient 29m 37s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 116m 12s hadoop-yarn-server-resourcemanager in the patch passed.
+1 💚 asflicense 0m 40s The patch does not generate ASF License warnings.
311m 45s
Subsystem Report/Notes
Docker ClientAPI=1.56 ServerAPI=1.56 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8752/7/artifact/out/Dockerfile
GITHUB PR #8752
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux ec7379c77dab 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 8765ce2
Default Java Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.12.1+1-1-24.04.4-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.20.1+1-1-24.04-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8752/7/testReport/
Max. process+thread count 969 (vs. ulimit of 10000)
modules C: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager U: hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8752/7/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants