CLI: Long list of containers is 1+N

Bug #1207125 reported by justinsb
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
Triaged
Undecided
Unassigned

Bug Description

Doing a long list of containers (swift list --long) produces slow output. It does a HEAD query per bucket.

It should instead just do a JSON list of buckets and output the results without a query-per-bucket.

Revision history for this message
Chmouel Boudjnah (chmouel) wrote :

Seems like it :

(two cont called foo and bar on this testvm)

stack@devstack:~$ swift --debug list --long 2>&1 |grep curl|grep -v keystonecl
DEBUG:swiftclient:REQ: curl -i http://127.0.0.1:8080/v1/AUTH_5d5facee92fd4d7ca28c20ce330efb5f?format=json -X GET -H "X-Auth-Token: cf42a4190e024194b7dc7538749f55x0"
DEBUG:swiftclient:REQ: curl -i http://127.0.0.1:8080/v1/AUTH_5d5facee92fd4d7ca28c20ce330efb5f/bar -I -H "X-Auth-Token: cf42a4190e024194b7dc7538749f55x0"
DEBUG:swiftclient:REQ: curl -i http://127.0.0.1:8080/v1/AUTH_5d5facee92fd4d7ca28c20ce330efb5f/foo -I -H "X-Auth-Token: cf42a4190e024194b7dc7538749f55x0"
DEBUG:swiftclient:REQ: curl -i http://127.0.0.1:8080/v1/AUTH_5d5facee92fd4d7ca28c20ce330efb5f?format=json&marker=foo -X GET -H "X-Auth-Token: cf42a4190e024194b7dc7538749f55x0"

Changed in python-swiftclient:
status: New → Triaged
Revision history for this message
Tim Burke (1-tim-z) wrote :

Yeah, that's pretty terrible. What if we just drop all of the `long` handling in service.py, and have shell.py always print '????-??-?? ??:??:??' for containers? Possibly with some --yes-really option to go back and do the actual HEADs.

Does anyone actually use or get value from the dates returned? It isn't even the Last-Modified for the container; it's the X-Timestamp (which is more like ctime than mtime). What if we just dropped the column entirely?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.