From fe7b88194aec8b7ded6b996baa5411ff5bcba837 Mon Sep 17 00:00:00 2001 From: JinmingHu Date: Thu, 3 Jun 2021 09:36:38 +0800 Subject: [PATCH] remove IfUnmodifiedSince from SetDataLakeFileSystemMetadataOptions (#2383) * remove IfUnmodifiedSince from SetDataLakeFileSystemMetadataOptions * cl --- sdk/storage/azure-storage-files-datalake/CHANGELOG.md | 4 ++++ .../azure/storage/files/datalake/datalake_options.hpp | 9 ++++++++- .../src/datalake_file_system_client.cpp | 3 --- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md index 94429815d..f1e7735c9 100644 --- a/sdk/storage/azure-storage-files-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-files-datalake/CHANGELOG.md @@ -6,6 +6,10 @@ - Renamed `ContentLength` in `FlushFileResult` to `FileSize`. +### Other Changes and Improvements + +- Removed `IfUnmodifiedSince` from access conditions of setting filesystem metadata operation. + ## 12.0.0-beta.11 (2021-05-19) ### New Features diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp index 6ab580c5e..0af991b87 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_options.hpp @@ -141,7 +141,14 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { /** * Specify the access condition for the file system. */ - FileSystemAccessConditions AccessConditions; + struct : public LeaseAccessConditions + { + /** + * @brief Specify this header to perform the operation only if the resource has been + * modified since the specified time. This timestamp will be truncated to second. + */ + Azure::Nullable IfModifiedSince; + } AccessConditions; }; /** diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index b9737919a..0d360a678 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -251,9 +251,6 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { Blobs::SetBlobContainerMetadataOptions blobOptions; blobOptions.AccessConditions.IfModifiedSince = options.AccessConditions.IfModifiedSince; - AZURE_ASSERT_MSG( - !options.AccessConditions.IfUnmodifiedSince.HasValue(), - "This operation doesn't support If-Unmodified-Since condition"); auto result = m_blobContainerClient.SetMetadata(std::move(metadata), blobOptions, context); Models::SetFileSystemMetadataResult ret;