-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bundle] Bundle Orchestrator - Batches #3260
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added more tests. Split tests by Orchestrator and Operation. Added more thread-safe validations.
…/microsoft/fhir-server into personal/fhibf/batchOrchestrator
Creating ResourceWrapper samples on the flight during tests.
Adding logic to release resources if they do not return 200 or 201.
fhibf
added
Enhancement
Enhancement on existing functionality.
Enhancement-Optimization
Optimization on existing functionality.
Azure API for FHIR
Label denotes that the issue or PR is relevant to the Azure API for FHIR
Azure Healthcare APIs
Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs
labels
Apr 25, 2023
Making BundleConfiguration a dependency of BundleOrchestrator. Adding a new configuration to AppSettings allowing BundleOrchestrator to be configurable.
- Improving tests. - Improving statistics collection.
src/Microsoft.Health.Fhir.SqlServer/Features/Storage/SqlServerFhirDataStore.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been through the non-test files.
...crosoft.Health.Fhir.Core.UnitTests/Features/Persistence/DataStoreOperationIdentifierTests.cs
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Tests.Common/Microsoft.Health.Fhir.Tests.Common.csproj
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandler.cs
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandler.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandlerStatistics.cs
Outdated
Show resolved
Hide resolved
...icrosoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandlerParallelOperations.cs
Outdated
Show resolved
Hide resolved
...icrosoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandlerParallelOperations.cs
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.CosmosDb/Features/Storage/CosmosFhirDataStore.cs
Outdated
Show resolved
Hide resolved
...Microsoft.Health.Fhir.Core/Features/Persistence/Orchestration/BundleOrchestratorOperation.cs
Outdated
Show resolved
Hide resolved
...t.Health.Fhir.Core/Features/Persistence/Orchestration/BundleOrchestratorOperationResource.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Shared.Api/Features/Resources/Bundle/BundleHandlerStatistics.cs
Outdated
Show resolved
Hide resolved
...lth.Fhir.Shared.Core.UnitTests/Features/Persistence/Orchestration/BundleOrchestratorTests.cs
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/SearchTestsBase.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/SortTests.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.Health.Fhir.Shared.Tests.E2E/Rest/Search/SortTests.cs
Outdated
Show resolved
Hide resolved
LTA-Thinking
approved these changes
May 26, 2023
SergeyGaluzo
approved these changes
May 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Azure API for FHIR
Label denotes that the issue or PR is relevant to the Azure API for FHIR
Azure Healthcare APIs
Label denotes that the issue or PR is relevant to the FHIR service in the Azure Healthcare APIs
Enhancement
Enhancement on existing functionality.
Enhancement-Optimization
Optimization on existing functionality.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In Bundle Orchestrator Part 1, resources in bundles of type "batch" are processed in parallel.
As soon as the bundle is received, resources are grouped by the respective operation type assigned and then processed in parallel.
Bundle Orchestrator is responsible for orchestrating/aggregating those resources on the fly and sending all them in a single operation to the database.
Some important changes made in this PR:
New class DataStoreOperationIdentifier: this is a new class that encapsulates the Resource Key and other additional attributes used to identify globally a single resource in the middle of a collection of resources processed by MergeAsync.
New Bundle Configuration: I've added a new flag to enable/disable Bundle Orchestrator.
BundleHandler: making BundleHandler class thread-safe.
Modifying MergeAsync signature: modifying MergeAsync returned data type to use DataStoreOperationIdentifier and better identify the resource submitted in the middle of all resources processed.
Bundle Orchestrator Operation ID: I've changed multiple parts of the code to propagate the Bundle Orchestrator Operation ID, to allow the data store layer to recognize that a resource is part of a bundle.
New HTTP Header tag: new HTTP header tag to allow customers running bundles sequentially or in parallel.
New Bundle validation: new validation to avoid duplicated resources in the same bundle.
Related issues
Addresses [issue #].
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)