尝试恢复 ActorService 的备份并收到以下错误:Method not found: 'Void System.Fabric.RestoreSettings..ctor(Boolean, Boolean)'
没有内部异常。
它是一个自定义的参与者服务,它扩展ActorService
并实现了一个扩展的接口IActorService
我检查了传入的备份文件夹,它是有效的,并且里面有备份。鉴于它已恢复,我认为它无关紧要,但这是从 Azure blob 存储中检索到的备份
这是引发异常的行:
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
这是它所在的方法:
protected override async Task<bool> OnDataLossAsync(RestoreContext restoreCtx, CancellationToken cancellationToken)
{
try
{
string backupFolder;
backupFolder = await this.backupManager.RestoreLatestBackupToTempLocation(cancellationToken);
RestoreDescription restoreRescription = new RestoreDescription(backupFolder, RestorePolicy.Force);
await restoreCtx.RestoreAsync(restoreRescription, cancellationToken);
DirectoryInfo tempRestoreDirectory = new DirectoryInfo(backupFolder);
tempRestoreDirectory.Delete(true);
return true;
}
catch (Exception e)
{
ActorEventSource.Current.Message("Restoration failed: " + "{0} {1}" + e.GetType() + e.Message);
throw;
}
}