summaryrefslogtreecommitdiff
path: root/cbuildbot/binhost.py
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2015-03-30 11:10:52 -0700
committerDavid James <davidjames@chromium.org>2015-03-30 19:43:13 +0000
commit591f884ecfdab9cabe65c4d92c60d16490be39d4 (patch)
tree58a64a50edf1c0f2f8b456dfdf2b604c1f833e4a /cbuildbot/binhost.py
parenta5f6573a7368536babcc78269968a90f744177f6 (diff)
downloadchromite-591f884ecfdab9cabe65c4d92c60d16490be39d4.tar.gz
Run equery in serial to workaround portage cache parallelism bugs.
Portage cache updates aren't parallel safe, so, as a workaround, run all equery requests in serial. A previous workaround tried to just run the first update in serial, but that wasn't enough, it turns out. BUG=chromium:470998, chromium:443254 TEST=Run the test locally. Change-Id: I71874c394efdd44f0ccd93ccf1c9206a9cb8c3a1 Reviewed-on: https://chromium-review.googlesource.com/262916 Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Tested-by: David James <davidjames@chromium.org>
Diffstat (limited to 'cbuildbot/binhost.py')
-rw-r--r--cbuildbot/binhost.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/cbuildbot/binhost.py b/cbuildbot/binhost.py
index a4965be36..b8aa56d4b 100644
--- a/cbuildbot/binhost.py
+++ b/cbuildbot/binhost.py
@@ -15,7 +15,6 @@ from chromite.cbuildbot import cbuildbot_config
from chromite.cbuildbot import constants
from chromite.lib import cros_build_lib
from chromite.lib import cros_logging as logging
-from chromite.lib import parallel
# A unique identifier for looking up CompatIds by board/useflags.
@@ -301,12 +300,9 @@ class CompatIdFetcher(object):
"""
# pylint: disable=method-hidden
logging.info('Fetching CompatId objects...')
- with parallel.Manager() as manager:
- # Fetching the first key updates the cache, so do that first before
- # launching a bunch of parallel jobs. This is needed because Portage
- # cache updates aren't parallel-safe. See http://crbug.com/470998
- self.compat_ids = manager.dict()
- if board_keys:
- self._FetchCompatId(*board_keys[0])
- parallel.RunTasksInProcessPool(self._FetchCompatId, board_keys[1:])
- return dict(self.compat_ids)
+ # Portage cache updates aren't parallel-safe, so limit to 1 job for now.
+ # See http://crbug.com/470998
+ self.compat_ids = {}
+ for key in board_keys:
+ self._FetchCompatId(*key)
+ return dict(self.compat_ids)