[Openstack] openstack swift object put request

pragya jain prag_2648 at yahoo.co.in
Sun Feb 2 03:21:30 UTC 2014


please somebody reply.

pragya jain



On Saturday, 1 February 2014 5:32 PM, pragya jain <prag_2648 at yahoo.co.in> wrote:
 
hi all,
>
>
>somebody help me to understand the following lines of code of ObjectController.PUT() in swift.proxy.controllers.obj.py
>
>
>def PUT(self, req):
>        """HTTP PUT request handler."""
>-----------
># do a HEAD request for container sync and checking object versions
>
>if 'x-timestamp' in req.headers or \
>                (object_versions and not
>                 req.environ.get('swift_versioned_copy')):
>            hreq = Request.blank(req.path_info, headers={'X-Newest': 'True'},
>                                 environ={'REQUEST_METHOD': 'HEAD'})
>            hresp = self.GETorHEAD_base(
>                hreq, _('Object'), self.app.object_ring, partition,
>                hreq.swift_entity_path)
>-----------
>
>
>in the following lines of code, self.GETorHEAD_base() create an HTTPConnection to object server for a HEAD request which is defined in ObjectController.HEAD() of swift.obj.server.py
>
>But we are in process of putting object, object is not written till yet on the node, then what will it return to hresp?
>
>
>thanks 
>Pragya Jain
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140202/b4d501c1/attachment.html>


More information about the Openstack mailing list