Skip to content

Commit 0d9d1f7

Browse files
authored
Merge pull request #8311 from achouhan09/azure-cache
Added a fix in upload_object for azure namespace cache bucket
2 parents 23add37 + c2aee5c commit 0d9d1f7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/sdk/namespace_blob.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ class NamespaceBlob {
747747
size,
748748
etag,
749749
create_time: flat_obj.lastModified,
750+
last_modified_time: flat_obj.lastModified,
750751
content_type: flat_obj.contentType,
751752
xattr: modified_xattr,
752753
tag_count: tag_count,

src/sdk/namespace_cache.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,9 @@ class NamespaceCache {
683683
async_get_last_modified_time: async () => {
684684
const upload_res = await hub_promise;
685685
const last_modified_time = (new Date(upload_res.last_modified_time)).getTime();
686+
if (isNaN(last_modified_time)) {
687+
throw new Error('Invalid last_modified_time returned from hub_promise, Expected a valid date or timestamp.');
688+
}
686689
return last_modified_time;
687690
},
688691
upload_chunks_hook: this.update_cache_stats_hook(params.bucket),

0 commit comments

Comments
 (0)