]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
PG: don't write out pg map epoch every handle_activate_map
authorSamuel Just <sam.just@inktank.com>
Mon, 15 Apr 2013 23:33:48 +0000 (16:33 -0700)
committerSamuel Just <sam.just@inktank.com>
Thu, 6 Jun 2013 16:28:55 +0000 (09:28 -0700)
commit4ee638cc3b1d74e678a3f78b3a57baf57a5d407c
tree6d1f727e91bc4d7a56d694d92111f3e3524a1c35
parent8c6a912ae46c4d3aeb7c1000d221f67e158ec5c8
PG: don't write out pg map epoch every handle_activate_map

We don't actually need to write out the pg map epoch on every
activate_map as long as:
a) the osd does not trim past the oldest pg map persisted
b) the pg does update the persisted map epoch from time
to time.

To that end, we now keep a reference to the last map persisted.
The OSD already does not trim past the oldest live OSDMapRef.
Second, handle_activate_map will trim if the difference between
the current map and the last_persisted_map is large enough.

Fixes: #4731
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/common/config_opts.h
src/osd/PG.cc
src/osd/PG.h