From 65b6b121656974453944cbc30922caf43f92f146 Mon Sep 17 00:00:00 2001 From: Kota Tsuyuzaki Date: Mon, 10 Jul 2017 18:58:36 -0700 Subject: [PATCH] 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: 44c63c69909e532e383017e7c900e4b7d13e0165 --- swift/obj/reconstructor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/swift/obj/reconstructor.py b/swift/obj/reconstructor.py index 3306b4b78d..766cb27476 100644 --- a/swift/obj/reconstructor.py +++ b/swift/obj/reconstructor.py @@ -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(