Ask Your Question
0

Does X-Newest apply to getting container lists and object lists? Also DLO?

asked 2014-04-02 18:15:00 -0500

Jimfr gravatar image

updated 2014-04-02 20:22:51 -0500

https://bugs.launchpad.net/openstack-api-site/+bug/1193417 (bug DB) implies it's only for GET or HEAD on an object path, yet http://docs.openstack.org/api/openstack-object-storage/1.0/content/GET_showAccountDetails_v1__account__storage_account_services.html# (Swift docs) imply it also applies for getting listings.

Also, when using X-Newest in GET on a Dynamic Large Object (DLO), does Swift use X-Newest semantics when it internally lists container contents to build the list of match object names it needs to concatenate contents for return?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-08 00:54:37 -0500

notmyname gravatar image

X-Newest applies to account and container reads, as well as object reads. It does not translate to large object manifest listings, for either dynamic or static large objects.


I think the above answers your specific question, but here is some more general advice: although the X-Newest semantics are available in the client API, do not rely on it to provide a guarantee about the data stored in the Swift cluster. X-Newest doesn't turn Swift into a strongly consistent storage system. X-Newest semantics simply queries the (current) primary storage nodes and compares the response of each, choosing the latest one. It's still possible that, due to cluster resizing, hardware failure, or other issues, there may be more recent data in the system. Swift guarantees that this newer data will propagate to the rest of the cluster, but not that a request with an X-Newest header will have the latest info in the cluster. The only way to guarantee that is to query literally every drive in the cluster.

X-Newest is essentially a "try harder" version of a read request. It should not be used normally by clients. It is useful for middleware and, in rare cases, by end-users.

edit flag offensive delete link more

Comments

Thanks, this helps. It would be great if this was in the official Swift API doc, I don't think that doc has thorough explanations of Swift consistency, or X-Newest.

Jimfr gravatar imageJimfr ( 2014-04-10 12:18:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-04-02 18:15:00 -0500

Seen: 719 times

Last updated: Apr 08 '14