You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2020/11/21 00:06:26 UTC

[GitHub] [samza] Sanil15 commented on a change in pull request #1441: SAMZA-2601: avoid infinite loop on container allocation

Sanil15 commented on a change in pull request #1441:
URL: https://github.com/apache/samza/pull/1441#discussion_r528032821



##########
File path: samza-core/src/main/java/org/apache/samza/clustermanager/ContainerAllocator.java
##########
@@ -234,6 +234,12 @@ void assignResourceRequests() {
         if (isRequestExpired(request)) {
           updateExpiryMetrics(request);
           containerManager.handleExpiredRequest(processorId, preferredHost, request, this, resourceRequestState);
+          // SAMZA-2601: to prevent infinite looping and logs filling up the disk, when host affinity is disabled,
+          // we explicitly break the loop here and the whole process gets retried in run() after allocatorSleepIntervalMs
+          if (!hostAffinityEnabled) {
+            LOG.info("Host affinity is disabled on expired request.");

Review comment:
       Replace it with something like this:
   
   LOG.info("Waiting for resources to get allocated for request {}, no retries will be issued since host affinity is disabled", request);




----------------------------------------------------------------
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:
users@infra.apache.org