Skip to content

remove the need for a double copy to minio #395

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

Merged
merged 8 commits into from
Jun 8, 2023
Merged

remove the need for a double copy to minio #395

merged 8 commits into from
Jun 8, 2023

Conversation

neildsouth
Copy link
Contributor

Description

on a store request the gateway currently
saves to file locally,
saves to Minio temp folder
moved from temp folder to final destination

This branch skips the second step and saves directly to the final folder.

Status

Work in progress

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • All tests passed locally.
  • Documentation comments included/updated.
  • User guide updated.
  • I have updated the changelog

@codecov
Copy link

codecov bot commented May 30, 2023

Codecov Report

Merging #395 (556d2c3) into develop (d27c8e3) will increase coverage by 0.03848%.
The diff coverage is 100.00000%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##             develop        #395         +/-   ##
===================================================
+ Coverage   79.63869%   79.67717%   +0.03848%     
===================================================
  Files            328         328                 
  Lines          20647       20568         -79     
  Branches         955         950          -5     
===================================================
- Hits           16443       16388         -55     
+ Misses          3876        3858         -18     
+ Partials         328         322          -6     
Flag Coverage Δ
unittests 79.67717% <100.00000%> (+0.03848%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Api/Storage/FileStorageMetadata.cs 100.00000% <ø> (ø)
...ay/Services/Connectors/PayloadMoveActionHandler.cs 64.17910% <ø> (-6.47958%) ⬇️
src/Configuration/ConfigurationValidator.cs 96.96970% <100.00000%> (ø)
...work/Test/SourceApplicationEntityRepositoryTest.cs 98.73418% <100.00000%> (+0.01622%) ⬆️
...tion.Test/SourceApplicationEntityRepositoryTest.cs 98.78049% <100.00000%> (+0.01506%) ⬆️
...ateway/Services/Connectors/DataRetrievalService.cs 81.56028% <100.00000%> (+0.91512%) ⬆️
...icsGateway/Services/Connectors/PayloadAssembler.cs 84.14634% <100.00000%> (+0.19571%) ⬆️
...rmaticsGateway/Services/DicomWeb/IStreamsWriter.cs 85.85859% <100.00000%> (+0.14430%) ⬆️
...rc/InformaticsGateway/Services/Fhir/FhirService.cs 78.94737% <100.00000%> (+0.56898%) ⬆️
...maticsGateway/Services/HealthLevel7/MllpService.cs 77.41935% <100.00000%> (+0.24543%) ⬆️
... and 4 more

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d27c8e3...556d2c3. Read the comment docs.

Signed-off-by: Neil South <[email protected]>
Signed-off-by: Neil South <[email protected]>
@@ -190,25 +190,31 @@ public async Task GivenAPayload_WhenAllFilesAreMove_ExpectPayloadToBeAddedToNoti
});

var correlationId = Guid.NewGuid();
var file1 = new DicomFileStorageMetadata(correlationId.ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), Guid.NewGuid().ToString());
Copy link
Contributor

@lillie-dae lillie-dae May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it be worth declaring a ctor that can take GUID?

example
image

public DicomFileStorageMetadata(Guid associationId, Guid identifier, Guid studyInstanceUid, Guid seriesInstanceUid, Guid sopInstanceUid) : this(
            associationId.ToString(),
            identifier.ToString(),
            studyInstanceUid.ToString(),
            seriesInstanceUid.ToString(),
            sopInstanceUid.ToString())
        { }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the code the only benefit for the above change would be the tests. so ....

@mocsharp
Copy link
Collaborator

This PR removes the ability to have the same instance in multiple payloads.
There was a discussion (some time ago) to have rule-based instance grouping which could result in sending the same instance to multiple payloads.

Signed-off-by: Neil South <[email protected]>
@JoeBatt1989
Copy link

We have ran some performance tests on this version and seen some significant improvements when sening the same data through (CT 326 slices). We are also seeing MinIO not reporting that we need to reduce our request rate which does sometimes leave the MIG is a broken state.

Previous baseline tests for MIG:

  • Avg = 34.4
  • Max = 36.2

New baseline tests for MIG:

  • Avg = 14
  • Max = 16.2

2023-06-08 09:51:14.1811|712|INFO|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadNotificationActionHandler||Workflow request published to md.workflow.request, message ID=33e05f11-c2bb-4492-ab29-25fd38a2135e. Payload took 00:00:13.1329433 to complete. 2023-06-08 09:52:46.3083|712|INFO|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadNotificationActionHandler||Workflow request published to md.workflow.request, message ID=01f9c934-d8aa-49f4-8f69-4bda2894e53a. Payload took 00:00:14.0552913 to complete. 2023-06-08 09:53:23.4085|712|INFO|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadNotificationActionHandler||Workflow request published to md.workflow.request, message ID=a8fc9cf1-c441-4ed5-96c8-9f6fdd5e0207. Payload took 00:00:13.9584748 to complete. 2023-06-08 09:53:50.4880|712|INFO|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadNotificationActionHandler||Workflow request published to md.workflow.request, message ID=06f49a60-4afe-4c85-a840-bf57b709cfea. Payload took 00:00:12.7193439 to complete. 2023-06-08 09:54:12.5633|712|INFO|Monai.Deploy.InformaticsGateway.Services.Connectors.PayloadNotificationActionHandler||Workflow request published to md.workflow.request, message ID=0d65548e-921e-488e-876e-00d420cc6b7d. Payload took 00:00:16.2113721 to complete.

@woodheadio
Copy link
Contributor

@mocsharp Based on the above findings and that this appears to have increased the stability of the MIG when sending 300-500 slice payloads in quick succession, I'm going to merge this change in. We can revisit this again if the requirement you mention is asked for again.

@woodheadio woodheadio merged commit b44839a into develop Jun 8, 2023
@woodheadio woodheadio added the bug Something isn't working label Jun 8, 2023
@woodheadio woodheadio added this to the 0.3.21 milestone Jun 8, 2023
@github-actions
Copy link

github-actions bot commented Jun 8, 2023

🎉 This issue has been resolved in version 0.3.21 🎉

The release is available on:

@mocsharp mocsharp deleted the AC-1298 branch August 10, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants