[ https://issues.apache.org/jira/browse/APEXCORE-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16034137#comment-16034137 ]
ASF GitHub Bot commented on APEXCORE-737: ----------------------------------------- GitHub user sanjaypujare opened a pull request: https://github.com/apache/apex-core/pull/535 APEXCORE-737 Increment numRequestedContainers instead of decrementing for an already allocated container @vrozov pls review and merge as appropriate You can merge this pull request into a Git repository by running: $ git pull https://github.com/sanjaypujare/apex-core APEXCORE-737.sanjay Alternatively you can review and apply these changes as the patch at: https://github.com/apache/apex-core/pull/535.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #535 ---- commit fe29df2cd6a5f6159da651666a2a086bbb00be60 Author: Sanjay Pujare <sanjaypuj...@users.noreply.github.com> Date: 2017-06-02T04:57:24Z APEXCORE-737 Increment numRequestedContainers instread of decrememnting for an already allocated container ---- > AppMaster does not shut down because numRequestedContainers becomes negative > ---------------------------------------------------------------------------- > > Key: APEXCORE-737 > URL: https://issues.apache.org/jira/browse/APEXCORE-737 > Project: Apache Apex Core > Issue Type: Bug > Reporter: Sanjay M Pujare > Assignee: Sanjay M Pujare > Original Estimate: 24h > Remaining Estimate: 24h > > A previous fix (for APEXCORE-624) has introduced a regression where > numRequestedContainers inside StreamingAppMasterService.execute() becomes > negative because instead of incrementing numRequestedContainers it is being > decremented under certain conditions as follows: > While processing the YARN response of container allocation/release request, > numRequestContainers is decremented by newAllocatedContainers.size() > (correctly). However in case of (alreadyAllocated == true) the decrement > should be undone by incrementing numRequestContainers (i.e. > numRequestContainers++). However the current code is decrementing again (i.e. > numRequestContainers--) on line 886 -- This message was sent by Atlassian JIRA (v6.3.15#6346)