assert(mdsmap->get_inc(whoami) > 0);
objecter->set_client_incarnation(mdsmap->get_inc(whoami));
}
+ // and inc_lock
+ objecter->set_inc_lock(mdsmap->get_last_failure());
// for debug
if (g_conf.mds_dump_cache_on_map)
friend class MDSMonitor;
public:
- MDSMap() : epoch(0), client_epoch(0), anchortable(0), root(0) {
+ MDSMap() : epoch(0), client_epoch(0), last_failure(0), anchortable(0), root(0) {
// hack.. this doesn't really belong here
cap_bit_timeout = (int)g_conf.mds_cap_timeout;
session_autoclose = (int)g_conf.mds_session_autoclose;
const utime_t& get_created() const { return created; }
void set_created(utime_t ct) { created = ct; }
+ epoch_t get_last_failure() const { return last_failure; }
+
int get_max_mds() const { return max_mds; }
void set_max_mds(int m) { max_mds = m; }
case MDSMap::STATE_ACTIVE:
case MDSMap::STATE_STOPPING:
newstate = MDSMap::STATE_FAILED;
+ pending_mdsmap.last_failure = pending_mdsmap.epoch;
break;
default:
case MDSMap::STATE_REJOIN:
// BUG: hrm, if this is the case, the STOPPING gusy won't be able to stop, will they?
pending_mdsmap.mds_state[p->first] = MDSMap::STATE_FAILED;
+ pending_mdsmap.last_failure = pending_mdsmap.epoch;
break;
}
}