[
https://issues.apache.org/jira/browse/GOBBLIN-1781?focusedWorklogId=844198&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844198
]
ASF GitHub Bot logged work on GOBBLIN-1781:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 07/Feb/23 23:38
Start Date: 07/Feb/23 23:38
Worklog Time Spent: 10m
Work Description: homatthew commented on code in PR #3638:
URL: https://github.com/apache/gobblin/pull/3638#discussion_r1099417152
##########
gobblin-yarn/src/main/java/org/apache/gobblin/yarn/YarnService.java:
##########
@@ -463,9 +467,13 @@ private EventSubmitter buildEventSubmitter() {
* @param yarnContainerRequestBundle the desired containers information,
including numbers, resource and helix tag
* @param inUseInstances a set of in use instances
*/
- public synchronized void
requestTargetNumberOfContainers(YarnContainerRequestBundle
yarnContainerRequestBundle, Set<String> inUseInstances) {
+ public synchronized boolean
requestTargetNumberOfContainers(YarnContainerRequestBundle
yarnContainerRequestBundle, Set<String> inUseInstances) {
LOGGER.info("Trying to set numTargetContainers={}, in-use helix instances
count is {}, container map size is {}",
yarnContainerRequestBundle.getTotalContainers(),
inUseInstances.size(), this.containerMap.size());
+ if (startupInProgress) {
+ LOGGER.info("RequestTargetNumberOfContainers waiting for startup to
complete first.");
Review Comment:
The log is a bit confusing to those reading it. Most people won't know what
this method call is. Consider a log more informative like:
> The yarn service is still starting up. Unable to request containers from
yarn until YarnService is finished starting up.
Issue Time Tracking
-------------------
Worklog Id: (was: 844198)
Time Spent: 40m (was: 0.5h)
> Helix offline instance purging is not thread safe in the yarn service
> ---------------------------------------------------------------------
>
> Key: GOBBLIN-1781
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1781
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Andy Jiang
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Helix instances are purged during startup of the yarn service. This operation
> must be done without new helix instances being added or removed (i.e. the API
> call is not thread safe).
>
> The current implementation blocks the yarn service from allocating initial
> containers while the helix instance purging is enabled, but it does not
> prevent other external services from requesting containers through its public
> methods.
> These 2 services start up concurrently, and it's possible that the
> AutoScalingYarnManager starts up before the Yarn Service is completely
> finished purging. This means leads to the AutoScalingYarnManager to
> requestContainers while the instances are still purging.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)