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:
parent
0c08161d8e
commit
9567bf730d
|
@ -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(); }
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue