Azurite
Azurite copied to clipboard
Add Blob Copy & Page Blob support to by SQL based metadata implementation in Blob API and Sync Loki and SQL metadata stores
Add Blob Copy & Page Blob support to by SQL based metadata implementation in Blob API. This makes the SQL based metadata implementation in sync with File based one. (issue #2224)
I divided the PR into very small mini commits for better visibility but most of these commits are small either in scope or code.
Changes are as follows:
In code: ([SqlBlobMetadataStore.ts])
- Changed properties from separate fields into a single one to allow serializing de-serializing of remaining properties as well.
- Added missing await from some async functions in SqlBlobMetadataStore
- Ported
copyFromURL
from Loki to SQL blobMeatadataStore - Ported
appendBlock
from Loki to SQL blobMeatadataStore - Ported
clearRange
from Loki to SQL blobMeatadataStore - Ported
getPageRanges
from Loki to SQL blobMeatadataStore - Ported
resizePageBlob
from Loki to SQL blobMeatadataStore - Ported
updateSequenceNumber
from Loki to SQL blobMeatadataStore - Return blobCommittedBlockCount for append blob in getBlobProperties in SQL blobMetadataStore
- Check for CopyIfExists condition in startCopyFromURL in SQL blobMetadaStore
In Tests:
- Add @sql to all @loki tests
- Ignore
generateAccountSASQueryParameters
in sas blob tests as it depend on timezone and fails even then and test another component not Azurite - Skip production style URL test as it fails in new sdk //To be fixed
- Remove skipping of "list uncimmited blob from container" in blob api container test since now it is working
- Added await to 2 async functions in 2 tests that was causing these 2 tests to be flaky
Others:
- Changed readme and changelog to relfect sync btween Loki and SQL blob metadata stores.
Note: I recommend removing the @loki and @sql all together and run all test cases without grep for both loki and sql to avoid descync in the future but its your call.