Fix a crash due to null log system

When a master starts, backup worker from old epochs may send BackupWorkerDoneRequest
to it. The master can be safely ignore it, since the checkRemoved logic of the
backup worker can self exit then.
This commit is contained in:
Jingyu Zhou 2019-08-14 22:07:25 -07:00
parent 0c08161d8e
commit 9567bf730d
1 changed files with 2 additions and 2 deletions

View File

@ -1628,10 +1628,10 @@ ACTOR Future<Void> masterServer( MasterInterface mi, Reference<AsyncVar<ServerDB
}
}
when(BackupWorkerDoneRequest req = waitNext(mi.notifyBackupWorkerDone.getFuture())) {
if (self->logSystem->removeBackupWorker(req)) {
if (self->logSystem.isValid() && self->logSystem->removeBackupWorker(req)) {
self->registrationTrigger.trigger();
req.reply.send(Void());
}
req.reply.send(Void());
}
when (wait(collection) ) { ASSERT(false); throw internal_error(); }
}