]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/OSDMap: fix clean_temps and test 9078/head
authorSage Weil <sage@redhat.com>
Thu, 12 May 2016 13:58:57 +0000 (09:58 -0400)
committerSage Weil <sage@redhat.com>
Thu, 12 May 2016 13:59:30 +0000 (09:59 -0400)
commit18d2bb9bc272a24dbfb776e658f5a18cca7441f1
tree592db7a10757489e507ded425b6ad0f9c10dc089
parent1a255b92523d672139a297aaae52cdc2be3d0fa9
osd/OSDMap: fix clean_temps and test

For both pg_temp and primary_temp, we want to calculate what the
mapping *will* be after the inc is applied, and if the mapping is
redundant (it matches what we would have gotten anyway), remove
it.  Removing the mapping might mean putting a 'remove' entry in
the inc, or it might mean removing the proposed addition in the
inc.

Update the unit test to test both cases.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSDMap.cc
src/test/osd/TestOSDMap.cc