Use an existing local var rather than doing alookup
This should make ``Ring.get_more_nodes`` microscopically faster. Change-Id: Ibf0988fe0630ad94ac0c04040766d89ef86d1488
This commit is contained in:
1 changed files with 1 additions and 1 deletions
@@ -313,7 +313,7 @@ class Ring(object):
dev_id = part2dev_id[handoff_part]
dev = self._devs[dev_id]
region = dev['region']
zone = (dev['region'], dev['zone'])
zone = (region, dev['zone'])
if dev_id not in used and region not in same_regions:
yield dev
used.add(dev_id)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.