]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/PGMap: update osd_epoch in synchrony with osd_stat_updates
authorSage Weil <sage@redhat.com>
Sat, 20 May 2017 21:25:11 +0000 (17:25 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 17:02:51 +0000 (13:02 -0400)
commitf0eff9223a923ba97de8be3e2201e0a2f297636f
tree95b4f71edc1332b597ee4cae46877411ee8b32c9
parent1c8c3d704912a7ab192f87b707c7da023515683f
mon/PGMap: update osd_epoch in synchrony with osd_stat_updates

I'm not sure why this didn't bite us earlier, but there is an assert
in apply_incremental (not used in preluminous mon) and an implicit
dereference in PGMonitor::encode_pending (maybe didn't cause crash?)
that will trigger if we have an osd_stat_updates record without a matching
osd_epochs update.  Maybe there is some subtle reason why the osd_epochs
update happens elsewhere in master (it doesn't on the mgr), but my guess
is we were silently dereferencing the invalid iterator and not noticing.

Anyway, it's easy to fix.  We use the epoch from the previous PGMap.

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc
src/mon/PGMap.h