Add small note for handoffs_only acceleration

The related change benefitts us greatly with decreasing hash
calculations for ignored partitions when handoffs_only mode is on
however, at the same time, it has been not able to care misplaced
fragments in the primary partition so that add the notation into the
code to let us know as "this is by design".

Change-Id: I16e3c1170af710e2a6ecc0b7267ab369450095bf
Related-Change: 44c63c6990
This commit is contained in:
Kota Tsuyuzaki 2017-07-10 18:58:36 -07:00
parent 8472cb6538
commit 65b6b12165
1 changed files with 6 additions and 0 deletions

View File

@ -978,6 +978,12 @@ class ObjectReconstructor(Daemon):
if override_partitions and (partition not in
override_partitions):
continue
# N.B. At a primary node in handoffs_only mode may skip to
# sync misplaced (handoff) fragments in the primary
# partition. That may happen while rebalancing several
# times. (e.g. a node holding handoff fragment being a new
# primary) Those fragments will be synced (and revert) once
# handoffs_only mode turned off.
if self.handoffs_only and any(
local_dev['id'] == n['id']
for n in policy.object_ring.get_part_nodes(