PawasChhokra commented on a change in pull request #1446:
URL: https://github.com/apache/samza/pull/1446#discussion_r546189004



##########
File path: 
samza-core/src/main/java/org/apache/samza/clustermanager/StandbyContainerManager.java
##########
@@ -181,13 +207,14 @@ private void handleStandbyContainerStop(String 
standbyContainerID, String resour
 
       // request standbycontainer's host for active-container
       SamzaResourceRequest resourceRequestForActive =
-          containerAllocator.getResourceRequestWithDelay(activeContainerID, 
standbyContainerHostname, preferredHostRetryDelay);
+        containerAllocator.getResourceRequestWithDelay(activeContainerID, 
standbyContainerHostname, preferredHostRetryDelay);
       // record the resource request, before issuing it to avoid race with 
allocation-thread
       failoverMetadata.get().recordResourceRequest(resourceRequestForActive);
       containerAllocator.issueResourceRequest(resourceRequestForActive);
 
       // request any-host for standby container
-      containerAllocator.requestResource(standbyContainerID, 
ResourceRequestState.ANY_HOST);
+      containerAllocator.requestResource(standbyContainerID, 
ResourceRequestState.ANY_HOST,

Review comment:
       I thought about this a lot and I think it makes sense to not alter the 
current flow at all in case the config is turned on. Hence I have now added 
that check for every `requestResource`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to