]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd: change in up set primary constitutes a peering interval change
authorSage Weil <sage@inktank.com>
Sun, 20 Apr 2014 05:04:33 +0000 (22:04 -0700)
committerSage Weil <sage@inktank.com>
Tue, 22 Apr 2014 04:26:25 +0000 (21:26 -0700)
commit000233f7326d8bf36756bddc62f7f09d479208a6
tree1899f3b78713b4aa77b9a24dafef2b762679d2ac
parent5562e26e655ce2937169083e89a821e7dbb8a3fc
osd: change in up set primary constitutes a peering interval change

In several places, a change in the up_primary triggers a new peering
interval, but the palces that actually generate the new past intervals,
including check_new_interval(), did not enforce that.  This becomes
somewhat obvious when you see that those callers are ignoring the
up_primary output argument for pg_to_up_acting_osds().

Fix this by adding arguments to check_new_interval and fixing the callers
to pass them in properly.  Add a unit test case to verify this.

Note that the past interval struct itself does not record who the
up_primary was; possibly it should.

Fixes: #8139
Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSD.cc
src/osd/PG.cc
src/osd/osd_types.cc
src/osd/osd_types.h
src/test/osd/types.cc