void Locker::handle_inode_file_caps(MInodeFileCaps *m)
{
// nobody should be talking to us during recovery.
- assert(mds->is_rejoin() || mds->is_active() || mds->is_stopping());
+ assert(mds->is_rejoin() || mds->is_clientreplay() || mds->is_active() || mds->is_stopping());
// ok
CInode *in = mdcache->get_inode(m->get_ino());
<< " follows " << follows
<< " op " << ceph_cap_op_name(m->get_op()) << dendl;
- if (!mds->is_active() && !mds->is_stopping() && !mds->is_clientreplay()) {
+ if (!mds->is_clientreplay() && !mds->is_active() && !mds->is_stopping()) {
mds->wait_for_replay(new C_MDS_RetryMessage(mds, m));
return;
}
void Locker::handle_lock(MLock *m)
{
// nobody should be talking to us during recovery.
- assert(mds->is_rejoin() || mds->is_active() || mds->is_stopping());
+ assert(mds->is_rejoin() || mds->is_clientreplay() || mds->is_active() || mds->is_stopping());
SimpleLock *lock = get_lock(m->get_lock_type(), m->get_object_info());
if (!lock) {
// hit the disk before the relevant dirfrags ever close)
if (dir->inode->is_auth() &&
dir->inode->can_auth_pin() &&
- (mds->is_active() || mds->is_stopping())) {
+ (mds->is_clientreplay() || mds->is_active() || mds->is_stopping())) {
CInode *in = dir->inode;
dout(10) << "try_subtree_merge_at journaling merged bound " << *in << dendl;
}
// am i a surviving ambiguous importer?
- if (mds->is_active() || mds->is_stopping()) {
+ if (mds->is_clientreplay() || mds->is_active() || mds->is_stopping()) {
// check for any import success/failure (from this node)
map<dirfrag_t, vector<dirfrag_t> >::iterator p = my_ambiguous_imports.begin();
while (p != my_ambiguous_imports.end()) {
MMDSCacheRejoin *ack = 0; // if survivor
bool survivor = false; // am i a survivor?
- if (mds->is_active() || mds->is_stopping()) {
+ if (mds->is_clientreplay() || mds->is_active() || mds->is_stopping()) {
survivor = true;
dout(10) << "i am a surivivor, and will ack immediately" << dendl;
ack = new MMDSCacheRejoin(MMDSCacheRejoin::OP_ACK);
// RESOLVE
// is someone else newly resolving?
- if (is_resolve() || is_rejoin() || is_active() || is_stopping()) {
+ if (is_resolve() || is_rejoin() || is_clientreplay() || is_active() || is_stopping()) {
set<int> oldresolve, resolve;
oldmap->get_mds_set(oldresolve, MDSMap::STATE_RESOLVE);
mdsmap->get_mds_set(resolve, MDSMap::STATE_RESOLVE);
// REJOIN
// is everybody finally rejoining?
- if (is_rejoin() || is_active() || is_stopping()) {
+ if (is_rejoin() || is_clientreplay() || is_active() || is_stopping()) {
// did we start?
if (!oldmap->is_rejoining() && mdsmap->is_rejoining())
rejoin_joint_start();
dout(1) << "cluster recovered." << dendl;
// did someone go active?
- if (is_active() || is_stopping()) {
+ if (is_clientreplay() || is_active() || is_stopping()) {
set<int> oldactive, active;
oldmap->get_mds_set(oldactive, MDSMap::STATE_ACTIVE);
mdsmap->get_mds_set(active, MDSMap::STATE_ACTIVE);
oldmap->get_inst(*p) != mdsmap->get_inst(*p))
mdcache->handle_mds_failure(*p);
}
- if (is_active() || is_stopping()) {
+ if (is_clientreplay() || is_active() || is_stopping()) {
// did anyone stop?
set<int> oldstopped, stopped;
oldmap->get_stopped_mds_set(oldstopped);
void MDS::recovery_done()
{
dout(1) << "recovery_done -- successful recovery!" << dendl;
- assert(is_active() || is_clientreplay());
+ assert(is_clientreplay() || is_active() || is_clientreplay());
// kick anchortable (resent AGREEs)
if (mdsmap->get_tableserver() == whoami) {
bool is_clientreplay(int m) { return get_state(m) == STATE_CLIENTREPLAY; }
bool is_active(int m) { return get_state(m) == STATE_ACTIVE; }
bool is_stopping(int m) { return get_state(m) == STATE_STOPPING; }
- bool is_active_or_stopping(int m) { return is_active(m) || is_stopping(m); }
+ bool is_clientreplay_or_active_or_stopping(int m) { return is_clientreplay(m) || is_active(m) || is_stopping(m); }
bool is_laggy(entity_addr_t a) { return mds_info.count(a) && mds_info[a].laggy(); }
p != dir->replicas_end();
++p) {
if (p->first == dest) continue;
- if (!mds->mdsmap->is_active_or_stopping(p->first))
+ if (!mds->mdsmap->is_clientreplay_or_active_or_stopping(p->first))
continue; // only if active
export_warning_ack_waiting[dir].insert(p->first);
export_notify_ack_waiting[dir].insert(p->first); // we'll eventually get a notifyack, too!
p != export_notify_ack_waiting[dir].end();
++p) {
MExportDirNotify *notify;
- if (mds->mdsmap->is_active_or_stopping(export_peer[dir]))
+ if (mds->mdsmap->is_clientreplay_or_active_or_stopping(export_peer[dir]))
// dest is still alive.
notify = new MExportDirNotify(dir->dirfrag(), true,
pair<int,int>(mds->get_nodeid(), dest),
}
// send finish/commit to new auth
- if (mds->mdsmap->is_active_or_stopping(export_peer[dir])) {
+ if (mds->mdsmap->is_clientreplay_or_active_or_stopping(export_peer[dir])) {
mds->send_message_mds(new MExportDirFinish(dir->dirfrag()), export_peer[dir]);
} else {
dout(7) << "not sending MExportDirFinish, dest has failed" << dendl;