Comment 3 for bug 1384451

Revision history for this message
clayg (clay-gerrard) wrote :

I think this *almost* got fixed when Kota fixed POST to update PUT timestamp - https://review.openstack.org/#/c/198632/

It's always going to be a *little* racy because the "most recent update" may not be the aggregate of *all* the latest updates - but at least we have the signal.

The problem is POST now updates X-Put-Timestamp - but not X-Timestamp which remains still the time the container was created:

ubuntu@saio:~$ curl http://localhost:6041/sdb4/450/AUTH_test/test -v
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 6041 (#0)
> GET /sdb4/450/AUTH_test/test HTTP/1.1
> Host: localhost:6041
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Length: 13
< X-Backend-Timestamp: 1501110795.41336
< X-Container-Object-Count: 1
< X-Put-Timestamp: 1501112155.68218
< X-Backend-Put-Timestamp: 1501112155.68218
< X-Container-Meta-Color: eal
< X-Backend-Delete-Timestamp: 0000000000.00000
< X-Container-Bytes-Used: 1172
< X-Timestamp: 1501110795.41336
< X-Backend-Storage-Policy-Index: 0
< Content-Type: text/plain; charset=utf-8
< X-Backend-Status-Changed-At: 1501110795.39889
< Date: Wed, 26 Jul 2017 23:38:20 GMT
<
pete_test.py
* Connection #0 to host localhost left intact

so then X-Newest (which *totally* works with containers) will make requests to all container db's and then always return whichever one was created most recently (instead of whichever one was *updated* most recently)