-
Notifications
You must be signed in to change notification settings - Fork 531
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
Changes to read raw resource from blob #4868
base: feature-branch/raw-resource-split
Are you sure you want to change the base?
Changes to read raw resource from blob #4868
Conversation
src/Microsoft.Health.Fhir.Core/Features/Persistence/IRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/FakeResponse.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
foreach (int offset in offsets) | ||
{ | ||
// Set reading position to offset | ||
blobStream.Seek(offset, SeekOrigin.Begin); |
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.
does this stream allow seek?
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.
It does. I have added check.
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.
Could you please any docs or steps how you checked. Just want to be sure since I was trying to use it this way and it did not let me. Also want to make sure I was not doing something wrong.
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 added this in the code:
if (!blobStream.CanSeek)
{
throw new NotSupportedException("This stream does not support seeking");
}
And tested with unit tests.
…m blob storage. Sorted offsets in ascending order before going through the blob file. Added unit tests and small test file to debug unit tests.
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Fixed
Show fixed
Hide fixed
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Fixed
Show fixed
Hide fixed
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Fixed
Show fixed
Hide fixed
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Persistence/ResourceWrapper.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/FakeResponse.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob.UnitTests/Features/Storage/BlobStoreTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Blob/Features/Storage/BlobRawResourceStore.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Health.Fhir.Core/Features/Persistence/RawResourceLocator.cs
Fixed
Show resolved
Hide resolved
Simplified unit tests Removed FakeResponse
Description
Describe the changes in this PR.
Related issues
Addresses [issue #].
Testing
Describe how this change was tested.
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)