Try to fix other ambiguities in what is the current queue server for a fetcher processing a fetch batch 2, a=chris

Chris Pollett [2020-07-20 01:Jul:th]
Try to fix other ambiguities in what is the current queue server for a fetcher processing a fetch batch 2, a=chris
Filename
src/executables/Fetcher.php
diff --git a/src/executables/Fetcher.php b/src/executables/Fetcher.php
index 894ed4cc2..5c7996301 100755
--- a/src/executables/Fetcher.php
+++ b/src/executables/Fetcher.php
@@ -1386,7 +1386,8 @@ class Fetcher implements CrawlConstants
      * any fetcher data we have to it.
      *
      * @param bool $at_least_once whether to send to the site info to at least
-     *     one queue server or to send only if memory is above threshold
+     *     one queue server or to send only if memory is above threshold.
+     *     Only in later casee is next server advanced.
      */
     public function selectCurrentServerAndUpdateIfNeeded($at_least_once)
     {
@@ -1396,7 +1397,9 @@ class Fetcher implements CrawlConstants
             Try to keep memory foot print smaller.
          */
         $cs = $this->current_server;
-        $next_server = ($cs + 1) % $num_servers;
+        if (!$at_least_once) {
+            $next_server = ($cs + 1) % $num_servers;
+        }
         do {
             if ($at_least_once ||
                 (isset($this->found_sites[self::TO_CRAWL][$cs]) &&
ViewGit