When a ring is rebalanced the number of changed partitions is counted.
Before this patch partitions might be rebalanced, but actually no data
is moved - for example, when a partition is assigned to the same device
as before. This results in a wrong number of reassigned partitions that
is shown to the user.
This patch remembers the partition allocation before the rebalance, and
compares it to the new allocation after a rebalance. Only partitions
that are stored on a different device than before are counted.
Reviewed: https:/ /review. openstack. org/120713 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=09bdc87cbc1 e7bc1918f9b5094 bec266b6761d75
Committed: https:/
Submitter: Jenkins
Branch: master
commit 09bdc87cbc1e7bc 1918f9b5094bec2 66b6761d75
Author: Christian Schwede <email address hidden>
Date: Thu Sep 11 08:01:51 2014 +0000
Return correct number of changed partitions
When a ring is rebalanced the number of changed partitions is counted.
Before this patch partitions might be rebalanced, but actually no data
is moved - for example, when a partition is assigned to the same device
as before. This results in a wrong number of reassigned partitions that
is shown to the user.
This patch remembers the partition allocation before the rebalance, and
compares it to the new allocation after a rebalance. Only partitions
that are stored on a different device than before are counted.
Partial-Bug: 1367826 1791f9191cef78c ff1b3e2645f
Also-By: Florent Flament <email address hidden>
Change-Id: Iacfd514df3af35