openstack swift object put request

asked 2014-02-02 03:49:55 -0500

pragya jain gravatar image

updated 2014-08-19 11:12:13 -0500

briancline gravatar image

hi all,

according to my understanding of openstack swift object put request flow path, the request first goes to the proxy server, then proxy server forward the request to ObjectController defined in swift.proxy.controllers.obj.py. Here is some portion of 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 HEAD request retrieve the metadata of the object

My question is:

AT these lines of code, we are in process of writting an object, object is not written till yet on the node, then what will it return to hresp?

thanks in advance Pragya Jain

edit retag flag offensive close merge delete