Update the returned future when local client is disabled

This commit is contained in:
Chaoguang Lin 2021-01-25 00:41:50 -08:00
parent c8538ef940
commit 6e619e9157
1 changed files with 2 additions and 4 deletions

View File

@ -816,10 +816,8 @@ ThreadFuture<int64_t> MultiVersionDatabase::rebootWorker(const StringRef& addres
}
ThreadFuture<Void> MultiVersionDatabase::forceRecoveryWithDataLoss(const StringRef &dcid) {
if (dbState->db) {
return dbState->db->forceRecoveryWithDataLoss(dcid);
}
return Void();
auto f = dbState->db ? dbState->db->forceRecoveryWithDataLoss(dcid) : ThreadFuture<Void>(Never());
return abortableFuture(f, dbState->dbVar->get().onChange);
}
void MultiVersionDatabase::Connector::connect() {