[Openstack] [swift] Updating object metadata in swift

Koert van der Veer koert at cloudvps.com
Wed Oct 10 10:23:18 UTC 2012


The documentation of Swift describes how it is possible to change
metadata entries, asif it were a key-value store. However, I was
surprised to learn that metadata is treated as a whole, and posting one
metadata header, will delete all other existing meta data.

This is particularly risky if things like X-Delete-After are used, as
updating the Content-Type equally destroys this attribute if you're not
careful. Worse even, there is no way to be careful; I know of no way to
atomically request a HEAD and then send a POST, leaving the some
concurrency issues open.

I really think we need a way to update single entries in the metadata. I
propose adding the "X-Merge-Metadata: yes". When this header is present,
existing metadata will be merged with the provided metadata. If we can
reach a consensus, I'll have an implementation ready to merge shortly
after the summit.

[1]
http://docs.openstack.org/api/openstack-object-storage/1.0/content/object-metadata.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121010/d105c25c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20121010/d105c25c/attachment.sig>


More information about the Openstack mailing list