[ 
https://issues.apache.org/jira/browse/GOBBLIN-1728?focusedWorklogId=818935&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-818935
 ]

ASF GitHub Bot logged work on GOBBLIN-1728:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Oct/22 20:30
            Start Date: 20/Oct/22 20:30
    Worklog Time Spent: 10m 
      Work Description: homatthew commented on code in PR #3586:
URL: https://github.com/apache/gobblin/pull/3586#discussion_r1001083931


##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java:
##########
@@ -845,8 +877,6 @@ public void onContainersAllocated(List<Container> 
containers) {
               instanceName = null;
             }
           }
-          allocatedContainerCountMap.put(containerHelixTag,

Review Comment:
   Another approach is to just add synchronization in `onContainersCompleted`. 
It doesn't make sense to me that handleCompletion method has no concurrency 
safe guards and can freely modify the inUsedInstances set while this method is 
iterating over the set. 
   
   I am hesitant to change too much here because "it works". But at the same 
time I'd love to make the usage of concurrency primitives consistent so it's 
not so confusing. 🤷 
   
   Even in the original PR there is a question about usage of explicit lock vs 
intrinsic lock https://github.com/apache/gobblin/pull/3059





Issue Time Tracking
-------------------

    Worklog Id:     (was: 818935)
    Time Spent: 3h 40m  (was: 3.5h)

> Yarn Service requests too many containers due to improper calculation
> ---------------------------------------------------------------------
>
>                 Key: GOBBLIN-1728
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1728
>             Project: Apache Gobblin
>          Issue Type: New Feature
>            Reporter: Matthew Ho
>            Priority: Major
>          Time Spent: 3h 40m
>  Remaining Estimate: 0h
>
> Yarn Service is responsible for calculating the number of instances based on 
> the helix tasks. Yarn service tracks the number of instances by asking Yarn 
> for the number of resource requests and the number of allocated containers.
>  
> It uses this count to determine if it should ask for more containers or 
> shrink the number of containers. This calculation is currently done 
> improperly and we continue to request containers when we have enough 
> requested.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to