mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-19 09:35:36 -05:00
Re-enable parallel message processing (#1741)
* add flag to handler * cleanup * concurrency control * add flag for handler setters * update service flags * fix event handlers * more handlers * make sure behavior is unchanged if flag is off * cleanup * add test case for parallel processing * comments * stop dispatcher in test * add log for request lifespan * cleanup and add comments * correctly release semaphore * remove deleted file from merge * use await for semaphore release * move handler invocation to await and adjust test * cleanup exception handling and wrapper * space * loose assertion condition to make test stable
This commit is contained in:
@@ -96,22 +96,22 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
public void InitializeService(IProtocolEndpoint serviceHost)
|
||||
{
|
||||
// Get database info
|
||||
serviceHost.SetRequestHandler(BackupConfigInfoRequest.Type, HandleBackupConfigInfoRequest);
|
||||
serviceHost.SetRequestHandler(BackupConfigInfoRequest.Type, HandleBackupConfigInfoRequest, true);
|
||||
|
||||
// Create backup
|
||||
serviceHost.SetRequestHandler(BackupRequest.Type, HandleBackupRequest);
|
||||
serviceHost.SetRequestHandler(BackupRequest.Type, HandleBackupRequest, true);
|
||||
|
||||
// Create restore task
|
||||
serviceHost.SetRequestHandler(RestoreRequest.Type, HandleRestoreRequest);
|
||||
serviceHost.SetRequestHandler(RestoreRequest.Type, HandleRestoreRequest, true);
|
||||
|
||||
// Create restore plan
|
||||
serviceHost.SetRequestHandler(RestorePlanRequest.Type, HandleRestorePlanRequest);
|
||||
serviceHost.SetRequestHandler(RestorePlanRequest.Type, HandleRestorePlanRequest, true);
|
||||
|
||||
// Cancel restore plan
|
||||
serviceHost.SetRequestHandler(CancelRestorePlanRequest.Type, HandleCancelRestorePlanRequest);
|
||||
serviceHost.SetRequestHandler(CancelRestorePlanRequest.Type, HandleCancelRestorePlanRequest, true);
|
||||
|
||||
// Create restore config
|
||||
serviceHost.SetRequestHandler(RestoreConfigInfoRequest.Type, HandleRestoreConfigInfoRequest);
|
||||
serviceHost.SetRequestHandler(RestoreConfigInfoRequest.Type, HandleRestoreConfigInfoRequest, true);
|
||||
|
||||
// Register file path validation callbacks
|
||||
FileBrowserServiceInstance.RegisterValidatePathsCallback(FileValidationServiceConstants.Backup, DisasterRecoveryFileValidator.ValidatePaths);
|
||||
|
||||
Reference in New Issue
Block a user