ierandra commented on code in PR #2409:
URL: https://github.com/apache/jackrabbit-oak/pull/2409#discussion_r2388293024
##########
oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureBlobStoreBackend.java:
##########
@@ -790,39 +687,43 @@ private static String getKeyName(DataIdentifier
identifier) {
private static String getIdentifierName(String key) {
if (!key.contains(Utils.DASH)) {
return null;
- } else if (key.contains(META_KEY_PREFIX)) {
+ } else if (key.contains(AZURE_BLOB_META_KEY_PREFIX)) {
return key;
}
return key.substring(0, 4) + key.substring(5);
}
private static String addMetaKeyPrefix(final String key) {
- return META_KEY_PREFIX + key;
+ return AZURE_BLOB_META_KEY_PREFIX + key;
}
private static String stripMetaKeyPrefix(String name) {
- if (name.startsWith(META_KEY_PREFIX)) {
- return name.substring(META_KEY_PREFIX.length());
+ if (name.startsWith(AZURE_BLOB_META_KEY_PREFIX)) {
+ return name.substring(AZURE_BLOB_META_KEY_PREFIX.length());
}
return name;
}
- private static void addLastModified(CloudBlockBlob blob) {
- blob.getMetadata().put(LAST_MODIFIED_KEY,
String.valueOf(System.currentTimeMillis()));
+ private static void updateLastModifiedMetadata(BlockBlobClient
blockBlobClient) {
+ BlobContainerClient blobContainerClient =
blockBlobClient.getContainerClient();
+ Map<String, String> metadata =
blobContainerClient.getProperties().getMetadata();
Review Comment:
it my be possible that if the metadata to be missing to get NULL. you should
add check and and put this map in a new map.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]