Title:
[ANeff] ER for: StoreAddMetadata() (no valid/future-proof workaround for its non-existence)
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 12/27/2014
Components: File Management, VFS-S3
Versions: 11.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: CF11_Final /
Priority/Frequency: Trivial / Unknown
Locale/System: English / Win All
Vote Count: 0
StoreAddMetadata() should be added b/c there is no valid future-proof workaround for its non-existence.
Steps to reproduce:
1) run storeAddMetadata("s3://mybucket/file.txt", {foo="bar"})
2) see exception: "Variable STOREADDMETADATA is undefined."
3) run the following:
----
metadata = storeGetMetadata("s3://mybucket/file.txt");
metadata.foo = "bar";
storeSetMetadata("s3://mybucket/file.txt", metadata);
----
4) see exception:
----
Error in Store operation.
rootCause - org.apache.commons.vfs2.FileSystemException: Could not set attribute "Last-Modified" of "s3://mybucket/file.txt".
----
5) run the following (not future-proof):
----
metadata = storeGetMetadata("s3://mybucket/file.txt");
metadata.foo = "bar";
structDelete(metadata, "last_modified");//this is actually "Last-Modified" on the S3 side
structDelete(metadata, "date");//b/c, otherwise, the above FileSystemException will sometimes also be thrown for "Date"
storeSetMetadata("s3://mybucket/file.txt", metadata);
----
Basically, there is no valid workaround for the non-existence of StoreAddMetadata() b/c CF returns metadata field names that do not match-up to S3's field names, so there is no future-proof way to _add_ metadata to an object w/o deleting any/all of the object's other metadata.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3915082
Reason: BugVerified
External Customer Info:
External Company:
External Customer Name: itisdesign
External Customer Email:
Attachments:
Comments: