Comment 5 for bug 1254405

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/58188
Committed: http://github.com/openstack/swift/commit/2c0bbaf05c06968cc0376f34acbfb09e72603d47
Submitter: Jenkins
Branch: master

commit 2c0bbaf05c06968cc0376f34acbfb09e72603d47
Author: Peter Portante <email address hidden>
Date: Sun Nov 24 23:29:53 2013 -0500

    Protect against hash cleanup errors on PUTs

    In http://launchpad.net/bugs/1254405 an exception occurs when
    finalizing the PUT of an object, but it is obscured by the thread pool
    code, so we don't see the actual line where it originated. However,
    there are two possible functions where this exception could originate:

        1. renamer()
        2. hash_cleanup_listdir()

    If this is an error in renamer(), there is some other waky problem
    where the temporary file has been removed. It is likely that this is a
    problem where a file name from os.listdir ends up disappearing (but
    even this is a rare occurence). Regardless, it is not clear that we
    really want an error from hash_cleanup_listdir() from affecting the
    return result of the PUT.

    To that end, we squelsh OSErrors from hash_cleanup_listdir() for
    now. One might argue for all errors, but since os.unlink() and
    os.listdir() raise OSError today, that is probably sufficient.

    Even that we use "Closes-Bug" below, it is not clear it can even be
    determined that this closes that bug report.

    Change-Id: I2f55df835c387e4d17cffda74c04c9994aebbe1f
    Closes-Bug: 1254405
    Signed-off-by: Peter Portante <email address hidden>