]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: generate past intervals in parallel on boot
authorSage Weil <sage@inktank.com>
Wed, 25 Jul 2012 17:57:35 +0000 (10:57 -0700)
committerSage Weil <sage@inktank.com>
Wed, 25 Jul 2012 20:28:55 +0000 (13:28 -0700)
commit9767146f8b7984fc86fd56b0ab8a72528184e6ab
treed3cfe4eb4d5b4183f87eb6c95fa72bbc73a55acd
parentd45929f4d035afc4dbee5631518be15f9428f370
osd: generate past intervals in parallel on boot

Even though we aggressively share past_intervals with notifies etc, it is
still possible for an osd to get buried behind a pile of old maps and need
to generate these if it has been out of the cluster for a while.  This has
happened to us in the past but, sadly, we did not merge the work then.
On the bright side, this implementation is much much much cleaner than the
old one because of the pg_interval_t helper we've since switched to.

On bootup, we look at the intervals each pg needs and calclate the union,
and then iterate over that map range.  The inner bit of the loop is
functionally identical to PG::build_past_intervals(), keeping the per-pg
state in the pistate struct.

Backport: argonaut
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
src/osd/OSD.cc
src/osd/OSD.h