else
begin = objects.begin()->first;
}
+
+ /// dump
+ void dump(Formatter *f) const {
+ f->dump_stream("begin") << begin;
+ f->dump_stream("end") << end;
+ f->open_array_section("objects");
+ for (map<hobject_t, eversion_t>::const_iterator i = objects.begin();
+ i != objects.end();
+ ++i) {
+ f->open_object_section("object");
+ f->dump_stream("object") << i->first;
+ f->dump_stream("version") << i->second;
+ f->close_section();
+ }
+ f->close_section();
+ }
};
BackfillInterval backfill_info;
bool all_unfound_are_queried_or_lost(const OSDMapRef osdmap) const;
virtual void mark_all_unfound_lost(int how) = 0;
+ virtual void dump_recovery_info(Formatter *f) const = 0;
bool calc_min_last_complete_ondisk() {
eversion_t min = last_complete_ondisk;
struct PushInfo {
ObjectRecoveryProgress recovery_progress;
ObjectRecoveryInfo recovery_info;
+
+ void dump(Formatter *f) const {
+ {
+ f->open_object_section("recovery_progress");
+ recovery_progress.dump(f);
+ f->close_section();
+ }
+ {
+ f->open_object_section("recovery_info");
+ recovery_info.dump(f);
+ f->close_section();
+ }
+ }
};
map<hobject_t, map<int, PushInfo> > pushing;
ObjectRecoveryProgress recovery_progress;
ObjectRecoveryInfo recovery_info;
+ void dump(Formatter *f) const {
+ {
+ f->open_object_section("recovery_progress");
+ recovery_progress.dump(f);
+ f->close_section();
+ }
+ {
+ f->open_object_section("recovery_info");
+ recovery_info.dump(f);
+ f->close_section();
+ }
+ }
+
bool is_complete() const {
return recovery_progress.is_complete(recovery_info);
}
set<hobject_t> backfills_in_flight;
map<hobject_t, pg_stat_t> pending_backfill_updates;
+ void dump_recovery_info(Formatter *f) const {
+ f->dump_int("backfill_target", get_backfill_target());
+ f->dump_int("waiting_on_backfill", waiting_on_backfill);
+ f->dump_stream("backfill_pos") << backfill_pos;
+ {
+ f->open_object_section("backfill_info");
+ backfill_info.dump(f);
+ f->close_section();
+ }
+ {
+ f->open_object_section("peer_backfill_info");
+ peer_backfill_info.dump(f);
+ f->close_section();
+ }
+ {
+ f->open_array_section("backfills_in_flight");
+ for (set<hobject_t>::const_iterator i = backfills_in_flight.begin();
+ i != backfills_in_flight.end();
+ ++i) {
+ f->dump_stream("object") << *i;
+ }
+ f->close_section();
+ }
+ {
+ f->open_array_section("pull_from_peer");
+ for (map<int, set<hobject_t> >::const_iterator i = pull_from_peer.begin();
+ i != pull_from_peer.end();
+ ++i) {
+ f->open_object_section("pulling_from");
+ f->dump_int("pull_from", i->first);
+ {
+ f->open_array_section("pulls");
+ for (set<hobject_t>::const_iterator j = i->second.begin();
+ j != i->second.end();
+ ++j) {
+ f->open_object_section("pull_info");
+ assert(pulling.count(*j));
+ pulling.find(*j)->second.dump(f);
+ f->close_section();
+ }
+ f->close_section();
+ }
+ f->close_section();
+ }
+ f->close_section();
+ }
+ {
+ f->open_array_section("pushing");
+ for (map<hobject_t, map<int, PushInfo> >::const_iterator i =
+ pushing.begin();
+ i != pushing.end();
+ ++i) {
+ f->open_object_section("object");
+ f->dump_stream("pushing") << i->first;
+ {
+ f->open_array_section("pushing_to");
+ for (map<int, PushInfo>::const_iterator j = i->second.begin();
+ j != i->second.end();
+ ++j) {
+ f->open_object_section("push_progress");
+ f->dump_stream("object_pushing") << j->first;
+ {
+ f->open_object_section("push_info");
+ j->second.dump(f);
+ f->close_section();
+ }
+ f->close_section();
+ }
+ f->close_section();
+ }
+ f->close_section();
+ }
+ f->close_section();
+ }
+ }
+
/// leading edge of backfill
hobject_t backfill_pos;