~MOSDPGQuery() {}
public:
- const char *get_type_name() { return "PGq"; }
+ const char *get_type_name() { return "pg_query"; }
+ void print(ostream& out) {
+ out << "pg_query(";
+ for (map<pg_t,PG::Query>::iterator p = pg_list.begin(); p != pg_list.end(); ++p) {
+ if (p != pg_list.begin())
+ out << ",";
+ out << p->first;
+ }
+ out << " epoch " << epoch << ")";
+ }
void encode_payload(CephContext *cct) {
::encode(epoch, payload);
bool PG::acting_up_affected(const vector<int>& newup, const vector<int>& newacting)
{
if (acting != newacting || up != newup) {
+ dout(20) << "acting_up_affected newup " << newup << " newacting " << newacting << dendl;
return true;
} else {
return false;
}
}
-bool PG::old_peering_msg(epoch_t reply_epoch,
- epoch_t query_epoch)
+bool PG::old_peering_msg(epoch_t reply_epoch, epoch_t query_epoch)
{
- return (last_peering_reset > reply_epoch ||
- last_peering_reset > query_epoch);
+ if (last_peering_reset > reply_epoch ||
+ last_peering_reset > query_epoch) {
+ dout(10) << "old_peering_msg reply_epoch " << reply_epoch << " query_epoch " << query_epoch
+ << " last_peering_reset " << last_peering_reset
+ << dendl;
+ return true;
+ }
+ return false;
}
remove_watchers_and_notifies();
}
-void PG::set_last_peering_reset() {
+void PG::set_last_peering_reset()
+{
+ dout(20) << "set_last_peering_reset " << osd->osdmap->get_epoch() << dendl;
last_peering_reset = osd->osdmap->get_epoch();
}
if (pg.acting != pg.up)
out << "/" << pg.acting;
out << " r=" << pg.get_role();
+ out << " lpr=" << pg.get_last_peering_reset();
if (pg.is_active() &&
pg.last_update_ondisk != pg.info.last_update)
bool is_primary() const { return role == PG_ROLE_HEAD; }
bool is_replica() const { return role > 0; }
+
+ epoch_t get_last_peering_reset() const { return last_peering_reset; }
//int get_state() const { return state; }
bool state_test(int m) const { return (state & m) != 0; }