Merge lp://qastaging/~ewanmellor/glance/lp698316 into lp://qastaging/~hudson-openstack/glance/trunk

Proposed by Ewan Mellor
Status: Rejected
Rejected by: Jay Pipes
Proposed branch: lp://qastaging/~ewanmellor/glance/lp698316
Merge into: lp://qastaging/~hudson-openstack/glance/trunk
Diff against target: 40 lines (+8/-5)
2 files modified
glance/server.py (+1/-1)
glance/store/filesystem.py (+7/-4)
To merge this branch: bzr merge lp://qastaging/~ewanmellor/glance/lp698316
Reviewer Review Type Date Requested Status
Jay Pipes (community) Disapprove
Review via email: mp+45454@code.qastaging.launchpad.net

Commit message

Bug #698316: Glance reads the whole image into memory when handling a POST /images request

Change the store API so that add takes a file-like object, not a string. This avoids loading the whole request body into memory before writing it out, and allows us to stream it instead.

Description of the change

Change the store API so that add takes a file-like object, not a string. This avoids loading the whole request body into memory before writing it out, and allows us to stream it instead.

To post a comment you must log in.
Revision history for this message
Jay Pipes (jaypipes) wrote :

Hi!

Looks good, but could I ask you to put in a test case for this? thanks!

-jay

review: Needs Fixing
Revision history for this message
Soren Hansen (soren) wrote :

Just to clarify, isn't body_file just a file like interface to the post body which is already loaded into memory?

Revision history for this message
Soren Hansen (soren) wrote :

Um, no. Apparantly not. My WSGI-fu is weak, it seems :)

Revision history for this message
Jay Pipes (jaypipes) wrote :

ping. Hi Ewan, how we doing on this? Need assistance on the test case?

Revision history for this message
Ewan Mellor (ewanmellor) wrote :

I just need more hours in the day. It's on my list. Be happy to beat me to it.

> -----Original Message-----
> From: <email address hidden> [mailto:<email address hidden>] On Behalf Of
> Jay Pipes
> Sent: 12 January 2011 11:48
> To: <email address hidden>
> Subject: Re: [Merge] lp:~ewanmellor/glance/lp698316 into lp:glance
>
> ping. Hi Ewan, how we doing on this? Need assistance on the test case?
> --
> https://code.launchpad.net/~ewanmellor/glance/lp698316/+merge/45454
> You are the owner of lp:~ewanmellor/glance/lp698316.

Revision history for this message
Jay Pipes (jaypipes) wrote :

OK, no worries, I'll put one together :)

Revision history for this message
Jay Pipes (jaypipes) wrote :

After looking into this further, existing unit tests were sufficient for this. I am rejecting this merge request, as I have merged trunk and resolved some conflicts. I will push my local branch of this directly to trunk.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches