)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":42,"context_line":"This, of course, is because the correct log level is \u0027warning\u0027. Now"},{"line_number":43,"context_line":"you get a KeyError if you call get_lines_for_level with a bogus log"},{"line_number":44,"context_line":"level."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: Ic6d6b833a5b04ca2019be94b1b90d941929d21c8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"da9df570_edce802d","line":45,"updated":"2014-09-25 17:36:02.000000000","message":"DocImpact for the new config options","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"This, of course, is because the correct log level is \u0027warning\u0027. Now"},{"line_number":43,"context_line":"you get a KeyError if you call get_lines_for_level with a bogus log"},{"line_number":44,"context_line":"level."},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"Change-Id: Ic6d6b833a5b04ca2019be94b1b90d941929d21c8"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"da9df570_e962e73c","line":45,"in_reply_to":"da9df570_edce802d","updated":"2014-09-25 21:45:14.000000000","message":"I\u0027m pretty sure that\u0027s all autogenerated now. \n\nIf you take a look at http://docs-draft.openstack.org/09/102609/11/check/gate-swift-docs/b960386/doc/build/html/deployment_guide.html#object-server-configuration, you\u0027ll see that the documentation there is taken directly from the sample configs.\n\nNow, why this option and a couple others aren\u0027t showing up in there is a mystery, but once the parser gets fixed up a bit, they should.","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"}],"etc/object-server.conf-sample":[{"author":{"_account_id":330,"name":"John Dickinson","email":"me@not.mn","username":"notmyname"},"change_message_id":"9e9d399a6b6a58edb6a0f5ec0517442dde9e573c","unresolved":false,"context_lines":[{"line_number":128,"context_line":"# replication_failure_threshold \u003d 100"},{"line_number":129,"context_line":"# replication_failure_ratio \u003d 1.0"},{"line_number":130,"context_line":"#"},{"line_number":131,"context_line":"# Use splice() for zero-copy object GETs. Requires splicetee to be installed."},{"line_number":132,"context_line":"# splice \u003d no"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"[filter:healthcheck]"}],"source_content_type":"application/octet-stream","patch_set":8,"id":"baada198_8ce677e6","line":131,"updated":"2014-08-12 22:47:35.000000000","message":"is splicetee used?","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":128,"context_line":"# replication_failure_threshold \u003d 100"},{"line_number":129,"context_line":"# replication_failure_ratio \u003d 1.0"},{"line_number":130,"context_line":"#"},{"line_number":131,"context_line":"# Use splice() for zero-copy object GETs."},{"line_number":132,"context_line":"# splice \u003d no"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"[filter:healthcheck]"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"1abeadc6_7533c413","line":131,"updated":"2014-08-29 18:49:46.000000000","message":"this might be a good place to mention the OS restrictions and warnings to expect/look for if not using a supported OS","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":128,"context_line":"# replication_failure_threshold \u003d 100"},{"line_number":129,"context_line":"# replication_failure_ratio \u003d 1.0"},{"line_number":130,"context_line":"#"},{"line_number":131,"context_line":"# Use splice() for zero-copy object GETs."},{"line_number":132,"context_line":"# splice \u003d no"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"[filter:healthcheck]"}],"source_content_type":"application/octet-stream","patch_set":9,"id":"fa98f980_4b5dbd46","line":131,"in_reply_to":"1abeadc6_7533c413","updated":"2014-09-03 00:56:49.000000000","message":"Done","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"}],"swift/common/utils.py":[{"author":{"_account_id":7680,"name":"Alex Gaynor","email":"alex.gaynor@gmail.com","username":"alex_gaynor"},"change_message_id":"3e7a56c3f9c1b781180abc90ae510a572c479160","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"    if _libc_accept is None:"},{"line_number":3033,"context_line":"        acceptfn \u003d load_libc_function(\u0027accept\u0027)"},{"line_number":3034,"context_line":"        if acceptfn is noop_libc_function:"},{"line_number":3035,"context_line":"            # Useful as a knitted condom."},{"line_number":3036,"context_line":"            raise LookupError(\"couldn\u0027t find accept() in libc\")"},{"line_number":3037,"context_line":"        _libc_accept \u003d acceptfn"},{"line_number":3038,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_d80ea73c","line":3035,"updated":"2014-06-27 20:17:31.000000000","message":"I\u0027d prefer this comment not be landed.","commit_id":"57fe9510cab9cdee95208c7fbc75ce9887094786"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"291851ccabbab2a6f9315fe787a27714a625414a","unresolved":false,"context_lines":[{"line_number":3032,"context_line":"    if _libc_accept is None:"},{"line_number":3033,"context_line":"        acceptfn \u003d load_libc_function(\u0027accept\u0027)"},{"line_number":3034,"context_line":"        if acceptfn is noop_libc_function:"},{"line_number":3035,"context_line":"            # Useful as a knitted condom."},{"line_number":3036,"context_line":"            raise LookupError(\"couldn\u0027t find accept() in libc\")"},{"line_number":3037,"context_line":"        _libc_accept \u003d acceptfn"},{"line_number":3038,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ae5cdf2_be02a306","line":3035,"in_reply_to":"1ae5cdf2_d80ea73c","updated":"2014-06-27 20:46:47.000000000","message":"Heh, yeah, I\u0027ve got to get better at scanning these diffs for leftovers before submitting them.\n\nActually, I can probably rework all this exception-handling malarkey. I was avoiding changing load_libc_function() before, but I\u0027m not sure why. It\u0027s not like it\u0027s especially complicated or anything; all the real work is done by ctypes.","commit_id":"57fe9510cab9cdee95208c7fbc75ce9887094786"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":106,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":107,"context_line":"#"},{"line_number":108,"context_line":"# The values were copied from the Linux 3.0 kernel headers."},{"line_number":109,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":110,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_381b0174","line":109,"updated":"2014-08-29 18:49:46.000000000","message":"a one liner per constant defining what is is and what the default value means would be nice I think","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":3104,"context_line":"                       ctypes.c_int(length), ctypes.c_int(flags))"},{"line_number":3105,"context_line":"    if ret \u003c 0:"},{"line_number":3106,"context_line":"        err \u003d ctypes.get_errno()"},{"line_number":3107,"context_line":"        if err \u003d\u003d errno.EWOULDBLOCK:"},{"line_number":3108,"context_line":"            return None"},{"line_number":3109,"context_line":"        else:"},{"line_number":3110,"context_line":"            raise IOError(err, \"splice() failed: %s\" % os.strerror(err))"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_63986e75","line":3107,"updated":"2014-08-29 18:49:46.000000000","message":"I might see the answer to this as I finish reviewing but will capture this note now just in case - why are we special casing this error?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":3104,"context_line":"                       ctypes.c_int(length), ctypes.c_int(flags))"},{"line_number":3105,"context_line":"    if ret \u003c 0:"},{"line_number":3106,"context_line":"        err \u003d ctypes.get_errno()"},{"line_number":3107,"context_line":"        if err \u003d\u003d errno.EWOULDBLOCK:"},{"line_number":3108,"context_line":"            return None"},{"line_number":3109,"context_line":"        else:"},{"line_number":3110,"context_line":"            raise IOError(err, \"splice() failed: %s\" % os.strerror(err))"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_fb02ce6d","line":3107,"in_reply_to":"1abeadc6_63986e75","updated":"2014-09-03 00:56:49.000000000","message":"Eventlet sets all our socket and file fds nonblocking (O_NONBLOCK). If we get EWOULDBLOCK here, it means the fd\u0027s buffer is empty (if reading) or full (if writing).\n\nSince empty/full buffers aren\u0027t semantically an error, but libc tells us about them via errno, we have to have this special case here.\n\nNotice that the caller looks for None and calls trampoline() so another greenthread can run. This is the same thing eventlet does internally for all the various IO functions that it monkeypatches, it\u0027s just that eventlet doesn\u0027t know about splice or tee, so we have to do it ourselves.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":3132,"context_line":""},{"line_number":3133,"context_line":""},{"line_number":3134,"context_line":"def system_has_splice():"},{"line_number":3135,"context_line":"    try:"},{"line_number":3136,"context_line":"        load_libc_function(\u0027splice\u0027, fail_if_missing\u003dTrue)"},{"line_number":3137,"context_line":"        return True"},{"line_number":3138,"context_line":"    except AttributeError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_3e4769bd","line":3135,"updated":"2014-08-29 18:49:46.000000000","message":"no big deal but you could set the global _libc_splice here right and avoid it happening twice (once here and once on first entry to splice()?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":3132,"context_line":""},{"line_number":3133,"context_line":""},{"line_number":3134,"context_line":"def system_has_splice():"},{"line_number":3135,"context_line":"    try:"},{"line_number":3136,"context_line":"        load_libc_function(\u0027splice\u0027, fail_if_missing\u003dTrue)"},{"line_number":3137,"context_line":"        return True"},{"line_number":3138,"context_line":"    except AttributeError:"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_6b56012c","line":3135,"in_reply_to":"1abeadc6_3e4769bd","updated":"2014-09-03 00:56:49.000000000","message":"Done","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"}],"swift/obj/diskfile.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"1762bc4dfdef4989d4f9dd4e04c2c73801fc8bd7","unresolved":false,"context_lines":[{"line_number":482,"context_line":"                (\"salg_type\", ctypes.c_ubyte * 14),"},{"line_number":483,"context_line":"                (\"salg_feat\", ctypes.c_uint),"},{"line_number":484,"context_line":"                (\"salg_mask\", ctypes.c_uint),"},{"line_number":485,"context_line":"                (\"salg_name\", ctypes.c_ubyte * 64)]"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"class DiskFileManager(object):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ae5cdf2_7fb14743","line":485,"updated":"2014-06-26 00:32:55.000000000","message":"You already define this class in utils, why not just import it?","commit_id":"3f86e731a1ae535f473eaa5cc5e24adaab1cef74"},{"author":{"_account_id":9205,"name":"Gil Vernik","email":"gilv@il.ibm.com","username":"gilv"},"change_message_id":"5b7d9ae71cba7851733e243b9b7c82d616ba262f","unresolved":false,"context_lines":[{"line_number":876,"context_line":"    :param device_path: on-disk device path, used when quarantining an obj"},{"line_number":877,"context_line":"    :param logger: logger caller wants this object to use"},{"line_number":878,"context_line":"    :param quarantine_hook: 1-arg callable called w/reason when quarantined"},{"line_number":879,"context_line":"    :param use_splice: if true, use zero-copy splice() to send data"},{"line_number":880,"context_line":"    :param keep_cache: should resulting reads be kept in the buffer cache"},{"line_number":881,"context_line":"    \"\"\""},{"line_number":882,"context_line":"    def __init__(self, fp, data_file, obj_size, etag, threadpool,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_7624d00c","line":879,"updated":"2014-07-06 06:36:13.000000000","message":":param pipe_size: ....","commit_id":"af57eec113a9b71cae436a7bcf3a77c9613d4643"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"704075d00fc7d2a45c265baccc83333152f6c423","unresolved":false,"context_lines":[{"line_number":876,"context_line":"    :param device_path: on-disk device path, used when quarantining an obj"},{"line_number":877,"context_line":"    :param logger: logger caller wants this object to use"},{"line_number":878,"context_line":"    :param quarantine_hook: 1-arg callable called w/reason when quarantined"},{"line_number":879,"context_line":"    :param use_splice: if true, use zero-copy splice() to send data"},{"line_number":880,"context_line":"    :param keep_cache: should resulting reads be kept in the buffer cache"},{"line_number":881,"context_line":"    \"\"\""},{"line_number":882,"context_line":"    def __init__(self, fp, data_file, obj_size, etag, threadpool,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_c70ea18b","line":879,"in_reply_to":"baada198_7624d00c","updated":"2014-07-07 21:14:37.000000000","message":"Done","commit_id":"af57eec113a9b71cae436a7bcf3a77c9613d4643"},{"author":{"_account_id":9205,"name":"Gil Vernik","email":"gilv@il.ibm.com","username":"gilv"},"change_message_id":"5b7d9ae71cba7851733e243b9b7c82d616ba262f","unresolved":false,"context_lines":[{"line_number":1147,"context_line":"    :param container: container name for the object"},{"line_number":1148,"context_line":"    :param obj: object name for the object"},{"line_number":1149,"context_line":"    :param _datadir: override the full datadir otherwise constructed here"},{"line_number":1150,"context_line":"    :param policy_idx: used to get the data dir when constructing it here"},{"line_number":1151,"context_line":"    \"\"\""},{"line_number":1152,"context_line":""},{"line_number":1153,"context_line":"    def __init__(self, mgr, device_path, threadpool, partition,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_b61ae8c3","line":1150,"updated":"2014-07-06 06:36:13.000000000","message":":param use_splice: ...\n:param: pipe_size...","commit_id":"af57eec113a9b71cae436a7bcf3a77c9613d4643"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"704075d00fc7d2a45c265baccc83333152f6c423","unresolved":false,"context_lines":[{"line_number":1147,"context_line":"    :param container: container name for the object"},{"line_number":1148,"context_line":"    :param obj: object name for the object"},{"line_number":1149,"context_line":"    :param _datadir: override the full datadir otherwise constructed here"},{"line_number":1150,"context_line":"    :param policy_idx: used to get the data dir when constructing it here"},{"line_number":1151,"context_line":"    \"\"\""},{"line_number":1152,"context_line":""},{"line_number":1153,"context_line":"    def __init__(self, mgr, device_path, threadpool, partition,"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_076b391e","line":1150,"in_reply_to":"baada198_b61ae8c3","updated":"2014-07-07 21:14:37.000000000","message":"Done","commit_id":"af57eec113a9b71cae436a7bcf3a77c9613d4643"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"a547b6dd1b7b9b87410e8478b7c33860ef48c444","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":86,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":87,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":88,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_f05879fc","line":87,"updated":"2014-08-14 18:26:20.000000000","message":"Can you import this from swift.common.utils?","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"a4bdcaccd14f65e260309fbdad25be32662afd96","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":86,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":87,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":88,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_3bb19247","line":87,"in_reply_to":"7ac7a964_f05879fc","updated":"2014-08-20 18:28:19.000000000","message":"Done","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"a547b6dd1b7b9b87410e8478b7c33860ef48c444","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":86,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":87,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":88,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def read_metadata(fd):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_701aa918","line":88,"updated":"2014-08-14 18:26:20.000000000","message":"Was 1031 a value from a C header file somewhere?  Experimentally determined?  Something else?  A comment answering that would be handy for Future Us.","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"a4bdcaccd14f65e260309fbdad25be32662afd96","unresolved":false,"context_lines":[{"line_number":85,"context_line":"# These constants are Linux-specific, and Python doesn\u0027t seem to know"},{"line_number":86,"context_line":"# about them. We ask anyway just in case that ever gets fixed."},{"line_number":87,"context_line":"AF_ALG \u003d getattr(socket, \u0027AF_ALG\u0027, 38)"},{"line_number":88,"context_line":"F_SETPIPE_SZ \u003d getattr(fcntl, \u0027F_SETPIPE_SZ\u0027, 1031)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def read_metadata(fd):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_7bb78a3a","line":88,"in_reply_to":"7ac7a964_701aa918","updated":"2014-08-20 18:28:19.000000000","message":"Done in utils.py","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"a547b6dd1b7b9b87410e8478b7c33860ef48c444","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                \"Use of splice() requested (config says \\\"splice \u003d %s\\\"), \""},{"line_number":523,"context_line":"                \"but the system does not support it. \""},{"line_number":524,"context_line":"                \"splice() will not be used.\" % conf.get(\u0027splice\u0027))"},{"line_number":525,"context_line":"            return"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        if conf_wants_splice and splice_available:"},{"line_number":528,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_d08d3d33","line":525,"updated":"2014-08-14 18:26:20.000000000","message":"Having a return buried in here may cause trouble if a developer later adds initialization code after these new stanzas.  Consider flow control here that allows non-error execution to reach the end of the method... like removing the \"return\" and turning the subsequent if into an elif.","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"a4bdcaccd14f65e260309fbdad25be32662afd96","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                \"Use of splice() requested (config says \\\"splice \u003d %s\\\"), \""},{"line_number":523,"context_line":"                \"but the system does not support it. \""},{"line_number":524,"context_line":"                \"splice() will not be used.\" % conf.get(\u0027splice\u0027))"},{"line_number":525,"context_line":"            return"},{"line_number":526,"context_line":""},{"line_number":527,"context_line":"        if conf_wants_splice and splice_available:"},{"line_number":528,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_fb7aba75","line":525,"in_reply_to":"7ac7a964_d08d3d33","updated":"2014-08-20 18:28:19.000000000","message":"Done","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        self.threadpools \u003d defaultdict("},{"line_number":506,"context_line":"            lambda: ThreadPool(nthreads\u003dthreads_per_disk))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        self.use_splice \u003d False"},{"line_number":509,"context_line":"        self.pipe_size \u003d None"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        splice_available \u003d system_has_splice()"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_9e36bd01","line":508,"updated":"2014-08-29 18:49:46.000000000","message":"seems like this block is big enough to make a setup_splice() func and call it from here","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        self.threadpools \u003d defaultdict("},{"line_number":506,"context_line":"            lambda: ThreadPool(nthreads\u003dthreads_per_disk))"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"        self.use_splice \u003d False"},{"line_number":509,"context_line":"        self.pipe_size \u003d None"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        splice_available \u003d system_has_splice()"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_6b044118","line":508,"in_reply_to":"1abeadc6_9e36bd01","updated":"2014-09-03 00:56:49.000000000","message":"I sort of like having all the initialization in one method; it\u0027s a little easier to fit in my head.\n\nIf you feel strongly about it, I\u0027m okay with pulling it out into a method, but my initial preference is to leave it.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":953,"context_line":""},{"line_number":954,"context_line":"        rfd \u003d self._fp.fileno()"},{"line_number":955,"context_line":"        client_rpipe, client_wpipe \u003d os.pipe()"},{"line_number":956,"context_line":"        hash_rpipe, hash_wpipe \u003d os.pipe()"},{"line_number":957,"context_line":"        md5_sockfd \u003d get_md5_socket()"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"        # The actual amount allocated to the pipe may be rounded up to the"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_a9c185e5","line":956,"updated":"2014-08-29 18:49:46.000000000","message":"heh, hash pipe :)","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":953,"context_line":""},{"line_number":954,"context_line":"        rfd \u003d self._fp.fileno()"},{"line_number":955,"context_line":"        client_rpipe, client_wpipe \u003d os.pipe()"},{"line_number":956,"context_line":"        hash_rpipe, hash_wpipe \u003d os.pipe()"},{"line_number":957,"context_line":"        md5_sockfd \u003d get_md5_socket()"},{"line_number":958,"context_line":""},{"line_number":959,"context_line":"        # The actual amount allocated to the pipe may be rounded up to the"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_fe5b9c2b","line":956,"in_reply_to":"1abeadc6_a9c185e5","updated":"2014-09-03 00:56:49.000000000","message":":)","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":970,"context_line":"        try:"},{"line_number":971,"context_line":"            while True:"},{"line_number":972,"context_line":"                # Read data from disk to pipe"},{"line_number":973,"context_line":"                bytes_in_pipe \u003d self._threadpool.run_in_thread("},{"line_number":974,"context_line":"                    splice, rfd, 0, client_wpipe, 0, pipe_size, 0)"},{"line_number":975,"context_line":"                if bytes_in_pipe \u003d\u003d 0:"},{"line_number":976,"context_line":"                    self._read_to_eof \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_49d9d120","line":973,"updated":"2014-08-29 18:49:46.000000000","message":"so this may be a dumb question because this function wasn\u0027t introduced here, but why would we want to run something in a thread and block for results?  As opposed to , here for example, just calling splice() directly?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":970,"context_line":"        try:"},{"line_number":971,"context_line":"            while True:"},{"line_number":972,"context_line":"                # Read data from disk to pipe"},{"line_number":973,"context_line":"                bytes_in_pipe \u003d self._threadpool.run_in_thread("},{"line_number":974,"context_line":"                    splice, rfd, 0, client_wpipe, 0, pipe_size, 0)"},{"line_number":975,"context_line":"                if bytes_in_pipe \u003d\u003d 0:"},{"line_number":976,"context_line":"                    self._read_to_eof \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_beed9427","line":973,"in_reply_to":"1abeadc6_49d9d120","updated":"2014-09-03 00:56:49.000000000","message":"If we splice() from a file, it\u0027s got the same problem as reading does: the kernel says the fd is readable, but when you read(), you can block for as long as the kernel feels like while it waits for the mechanical disk parts to come into alignment.\n\nThis way we can at least let other greenthreads proceed while one real thread goes and blocks in read() for a good long while. If we called splice() directly, the main thread would block, and none of its other greenthreads could make progress.\n\nSame goes for write() if the kernel is low on buffer cache.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":995,"context_line":"                # Take the data and feed it into an in-kernel MD5 socket. The"},{"line_number":996,"context_line":"                # MD5 socket hashes data that is written to it. Reading from"},{"line_number":997,"context_line":"                # it yields the MD5 checksum of the written data."},{"line_number":998,"context_line":"                hashed \u003d splice(hash_rpipe, 0, md5_sockfd, 0,"},{"line_number":999,"context_line":"                                bytes_in_pipe, SPLICE_F_MORE)"},{"line_number":1000,"context_line":"                if hashed !\u003d bytes_in_pipe:"},{"line_number":1001,"context_line":"                    # It\u0027s a data sink; it doesn\u0027t get full."}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_0927d9ca","line":998,"updated":"2014-08-29 18:49:46.000000000","message":"so here you just call splice instead of via a thread call like above, how come?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                # it yields the MD5 checksum of the written data."},{"line_number":998,"context_line":"                hashed \u003d splice(hash_rpipe, 0, md5_sockfd, 0,"},{"line_number":999,"context_line":"                                bytes_in_pipe, SPLICE_F_MORE)"},{"line_number":1000,"context_line":"                if hashed !\u003d bytes_in_pipe:"},{"line_number":1001,"context_line":"                    # It\u0027s a data sink; it doesn\u0027t get full."},{"line_number":1002,"context_line":"                    raise Exception(\"md5 socket didn\u0027t take all the data? \""},{"line_number":1003,"context_line":"                                    \"(tried to write %d, but wrote %d)\" %"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_44e53836","line":1000,"updated":"2014-08-29 18:49:46.000000000","message":"is it not possible to get \u0027None\u0027 back here and tramp instead of raise error?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":997,"context_line":"                # it yields the MD5 checksum of the written data."},{"line_number":998,"context_line":"                hashed \u003d splice(hash_rpipe, 0, md5_sockfd, 0,"},{"line_number":999,"context_line":"                                bytes_in_pipe, SPLICE_F_MORE)"},{"line_number":1000,"context_line":"                if hashed !\u003d bytes_in_pipe:"},{"line_number":1001,"context_line":"                    # It\u0027s a data sink; it doesn\u0027t get full."},{"line_number":1002,"context_line":"                    raise Exception(\"md5 socket didn\u0027t take all the data? \""},{"line_number":1003,"context_line":"                                    \"(tried to write %d, but wrote %d)\" %"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_96b42c36","line":1000,"in_reply_to":"1abeadc6_44e53836","updated":"2014-09-03 00:56:49.000000000","message":"Not here... we are splicing from a pipe that has a known quantity of data into an MD5 socket.\n\nI\u0027ll add a couple more comments explaining why, though.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"                    else:"},{"line_number":1012,"context_line":"                        bytes_in_pipe -\u003d sent"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"                if self._bytes_read - dropped_cache \u003e DROP_CACHE_WINDOW:"},{"line_number":1015,"context_line":"                    self._drop_cache(rfd, dropped_cache,"},{"line_number":1016,"context_line":"                                     self._bytes_read - dropped_cache)"},{"line_number":1017,"context_line":"                    dropped_cache \u003d self._bytes_read"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_c4c868aa","line":1014,"updated":"2014-08-29 18:49:46.000000000","message":"what were the considerations for the size chosen here of 1024*1024?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":1011,"context_line":"                    else:"},{"line_number":1012,"context_line":"                        bytes_in_pipe -\u003d sent"},{"line_number":1013,"context_line":""},{"line_number":1014,"context_line":"                if self._bytes_read - dropped_cache \u003e DROP_CACHE_WINDOW:"},{"line_number":1015,"context_line":"                    self._drop_cache(rfd, dropped_cache,"},{"line_number":1016,"context_line":"                                     self._bytes_read - dropped_cache)"},{"line_number":1017,"context_line":"                    dropped_cache \u003d self._bytes_read"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_dbe98a81","line":1014,"in_reply_to":"1abeadc6_c4c868aa","updated":"2014-09-03 00:56:49.000000000","message":"I\u0027m just reusing the same value as the user-space GET path (see __iter__).\n\nI did forget to make __iter__ use the constant instead of the hardcoded value, though. Good catch; will fix.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                bin_checksum \u003d os.read(md5_sockfd, 16)"},{"line_number":1024,"context_line":"                hex_checksum \u003d \u0027\u0027.join(\"%02x\" % ord(c) for c in bin_checksum)"},{"line_number":1025,"context_line":"            else:"},{"line_number":1026,"context_line":"                hex_checksum \u003d MD5_OF_EMPTY_STRING"},{"line_number":1027,"context_line":"            self._md5_of_sent_bytes \u003d hex_checksum"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"            os.close(client_rpipe)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_c4b22805","line":1026,"updated":"2014-08-29 18:49:46.000000000","message":"is this supposed to be the MD5(00000000000000000000000000000000) or what? Trying to see where the value for MD5_OF_EMPTY_STRING defined earlier came from","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                bin_checksum \u003d os.read(md5_sockfd, 16)"},{"line_number":1024,"context_line":"                hex_checksum \u003d \u0027\u0027.join(\"%02x\" % ord(c) for c in bin_checksum)"},{"line_number":1025,"context_line":"            else:"},{"line_number":1026,"context_line":"                hex_checksum \u003d MD5_OF_EMPTY_STRING"},{"line_number":1027,"context_line":"            self._md5_of_sent_bytes \u003d hex_checksum"},{"line_number":1028,"context_line":""},{"line_number":1029,"context_line":"            os.close(client_rpipe)"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_be511410","line":1026,"in_reply_to":"1abeadc6_c4b22805","updated":"2014-09-03 00:56:49.000000000","message":"\u003e\u003e\u003e import hashlib\n    \u003e\u003e\u003e hashlib.md5(\"\").hexdigest()\n    \u0027d41d8cd98f00b204e9800998ecf8427e\u0027\n    \u003e\u003e\u003e \n\nIf you never send any data to an md5 socket, I guess there\u0027s some setup or something that doesn\u0027t happen in the kernel, and the value you get out is entirely bogus. My guess is that it\u0027s some lazy initialization that happens on the first write/splice/whatever call, but I looked at the kernel source and I had a really hard time seeing how the plumbing was hooked up.","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                if err.errno !\u003d errno.EAFNOSUPPORT:"},{"line_number":530,"context_line":"                    raise"},{"line_number":531,"context_line":"                self.logger.warn(\"MD5 sockets not supported. \""},{"line_number":532,"context_line":"                                 \"splice() will not be used.\")"},{"line_number":533,"context_line":"            else:"},{"line_number":534,"context_line":"                self.use_splice \u003d True"},{"line_number":535,"context_line":"                with open(\u0027/proc/sys/fs/pipe-max-size\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_cf01ac06","line":532,"updated":"2014-09-25 17:36:02.000000000","message":"So is the logic here that md5 sockets and splice are contemporary w.r.t. inclusion in kernel version? Is it possible that md5 sockets are supported but splice is not?","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":529,"context_line":"                if err.errno !\u003d errno.EAFNOSUPPORT:"},{"line_number":530,"context_line":"                    raise"},{"line_number":531,"context_line":"                self.logger.warn(\"MD5 sockets not supported. \""},{"line_number":532,"context_line":"                                 \"splice() will not be used.\")"},{"line_number":533,"context_line":"            else:"},{"line_number":534,"context_line":"                self.use_splice \u003d True"},{"line_number":535,"context_line":"                with open(\u0027/proc/sys/fs/pipe-max-size\u0027) as f:"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_09c2cb58","line":532,"in_reply_to":"da9df570_cf01ac06","updated":"2014-09-25 21:45:14.000000000","message":"Splice came first. It might be possible in the future for some other kernel to implement md5 sockets but not splice, but for Linux, this ordering works, and I\u0027m pretty sure both md5 sockets (AF_ALG as a whole, really) and splice are both Linux-specific things.","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                 \"splice() will not be used.\")"},{"line_number":533,"context_line":"            else:"},{"line_number":534,"context_line":"                self.use_splice \u003d True"},{"line_number":535,"context_line":"                with open(\u0027/proc/sys/fs/pipe-max-size\u0027) as f:"},{"line_number":536,"context_line":"                    max_pipe_size \u003d int(f.read())"},{"line_number":537,"context_line":"                self.pipe_size \u003d min(max_pipe_size, self.disk_chunk_size)"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_ad5d5817","line":535,"updated":"2014-09-25 17:36:02.000000000","message":"Maybe wrap the open in a try/except+log in case someone paranoid has really locked down their obj server and /proc cannot be read. (I guess recon needs to read /proc, so..make that \u0027very paranoid\u0027).","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":532,"context_line":"                                 \"splice() will not be used.\")"},{"line_number":533,"context_line":"            else:"},{"line_number":534,"context_line":"                self.use_splice \u003d True"},{"line_number":535,"context_line":"                with open(\u0027/proc/sys/fs/pipe-max-size\u0027) as f:"},{"line_number":536,"context_line":"                    max_pipe_size \u003d int(f.read())"},{"line_number":537,"context_line":"                self.pipe_size \u003d min(max_pipe_size, self.disk_chunk_size)"},{"line_number":538,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_89f87bc4","line":535,"in_reply_to":"da9df570_ad5d5817","updated":"2014-09-25 21:45:14.000000000","message":"Could be worth doing, but I\u0027d prefer to do it in a future patch since this one seems about ready to go.","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":989,"context_line":"                    # fail here. If we don\u0027t raise an exception, then we will"},{"line_number":990,"context_line":"                    # have the incorrect MD5 hash once the object has been"},{"line_number":991,"context_line":"                    # sent out, causing a false-positive quarantine."},{"line_number":992,"context_line":"                    raise Exception(\"tee() failed: tried to move %d bytes, \""},{"line_number":993,"context_line":"                                    \"but only moved %d\" %"},{"line_number":994,"context_line":"                                    (bytes_in_pipe, bytes_copied))"},{"line_number":995,"context_line":"                # Take the data and feed it into an in-kernel MD5 socket. The"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_14c90dac","line":992,"updated":"2014-09-25 17:36:02.000000000","message":"I know I\u0027m being dumb, but I\u0027m struggling to see where this exception gets caught - is it handled by wsgi?","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":989,"context_line":"                    # fail here. If we don\u0027t raise an exception, then we will"},{"line_number":990,"context_line":"                    # have the incorrect MD5 hash once the object has been"},{"line_number":991,"context_line":"                    # sent out, causing a false-positive quarantine."},{"line_number":992,"context_line":"                    raise Exception(\"tee() failed: tried to move %d bytes, \""},{"line_number":993,"context_line":"                                    \"but only moved %d\" %"},{"line_number":994,"context_line":"                                    (bytes_in_pipe, bytes_copied))"},{"line_number":995,"context_line":"                # Take the data and feed it into an in-kernel MD5 socket. The"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_49af7394","line":992,"in_reply_to":"da9df570_14c90dac","updated":"2014-09-25 21:45:14.000000000","message":"__call__ in object server has a catch-all clause that logs and returns a 500.","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                                    (bytes_in_pipe, hashed))"},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"                while bytes_in_pipe \u003e 0:"},{"line_number":1013,"context_line":"                    sent \u003d splice(client_rpipe, 0, wsockfd, 0,"},{"line_number":1014,"context_line":"                                  bytes_in_pipe, 0)"},{"line_number":1015,"context_line":"                    if sent is None:  # would have blocked"},{"line_number":1016,"context_line":"                        trampoline(wsockfd, write\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_5460f500","line":1013,"updated":"2014-09-25 17:36:02.000000000","message":"I\u0027ve seen answer to Pual\u0027s questions on earlier patch, but one more dumb question: this splice is not in a thread, is that because we know wsockfd won\u0027t block (unlike the file read which could be waiting on spindles)?","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                                    (bytes_in_pipe, hashed))"},{"line_number":1011,"context_line":""},{"line_number":1012,"context_line":"                while bytes_in_pipe \u003e 0:"},{"line_number":1013,"context_line":"                    sent \u003d splice(client_rpipe, 0, wsockfd, 0,"},{"line_number":1014,"context_line":"                                  bytes_in_pipe, 0)"},{"line_number":1015,"context_line":"                    if sent is None:  # would have blocked"},{"line_number":1016,"context_line":"                        trampoline(wsockfd, write\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_e9b827ca","line":1013,"in_reply_to":"da9df570_5460f500","updated":"2014-09-25 21:45:14.000000000","message":"Right; we know this splice() syscall will either complete quickly (kernel socket buffer has space) or return EWOULDBLOCK (kernel socket buffer lacks space).\n\nOur splice() function translates EWOULDBLOCK to a return value of None, and you can see that explicitly handled a couple lines down from here with a trampoline() call.","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"8de9b58b5f08b2038f12bbdea9a8e998be8c5806","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            os.close(client_wpipe)"},{"line_number":1037,"context_line":"            os.close(hash_rpipe)"},{"line_number":1038,"context_line":"            os.close(hash_wpipe)"},{"line_number":1039,"context_line":"            os.close(md5_sockfd)"},{"line_number":1040,"context_line":"            self.close()"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"    def app_iter_range(self, start, stop):"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_2f0dd837","line":1039,"updated":"2014-09-25 17:36:02.000000000","message":"and wsockfd is closed by wsgi, right?","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"2364ec051034519018fde32034f1cd8feb97bc3c","unresolved":false,"context_lines":[{"line_number":1036,"context_line":"            os.close(client_wpipe)"},{"line_number":1037,"context_line":"            os.close(hash_rpipe)"},{"line_number":1038,"context_line":"            os.close(hash_wpipe)"},{"line_number":1039,"context_line":"            os.close(md5_sockfd)"},{"line_number":1040,"context_line":"            self.close()"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"    def app_iter_range(self, start, stop):"}],"source_content_type":"text/x-python","patch_set":11,"id":"da9df570_c9bfe3a8","line":1039,"in_reply_to":"da9df570_2f0dd837","updated":"2014-09-25 21:45:14.000000000","message":"Yes, wsockfd is owned by wsgi. We pried it out of env[\u0027wsgi.input\u0027].","commit_id":"7d0e5ebe690bf3cf41ccd970281d532a23284e58"}],"swift/obj/server.py":[{"author":{"_account_id":2696,"name":"Darrell Bishop","email":"dbishop@nvidia.com","username":"darrellb"},"change_message_id":"a547b6dd1b7b9b87410e8478b7c33860ef48c444","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        # but the common case is sending the whole object, so we\u0027ll start"},{"line_number":720,"context_line":"        # there."},{"line_number":721,"context_line":"        #"},{"line_number":722,"context_line":"        # There\u0027s almost certainly an analogous form for zero-copy PUT"},{"line_number":723,"context_line":"        # requests."},{"line_number":724,"context_line":"        if req.method \u003d\u003d \u0027GET\u0027 and res.status_int \u003d\u003d 200 and \\"},{"line_number":725,"context_line":"           isinstance(env[\u0027wsgi.input\u0027], wsgi.Input):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7ac7a964_704e29c3","line":722,"updated":"2014-08-14 18:26:20.000000000","message":"You can confidently say that this exists, and maybe that it\u0027s on its way, right?","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"a4bdcaccd14f65e260309fbdad25be32662afd96","unresolved":false,"context_lines":[{"line_number":719,"context_line":"        # but the common case is sending the whole object, so we\u0027ll start"},{"line_number":720,"context_line":"        # there."},{"line_number":721,"context_line":"        #"},{"line_number":722,"context_line":"        # There\u0027s almost certainly an analogous form for zero-copy PUT"},{"line_number":723,"context_line":"        # requests."},{"line_number":724,"context_line":"        if req.method \u003d\u003d \u0027GET\u0027 and res.status_int \u003d\u003d 200 and \\"},{"line_number":725,"context_line":"           isinstance(env[\u0027wsgi.input\u0027], wsgi.Input):"}],"source_content_type":"text/x-python","patch_set":8,"id":"1abeadc6_7b606acf","line":722,"in_reply_to":"7ac7a964_704e29c3","updated":"2014-08-20 18:28:19.000000000","message":"I\u0027ll just take this part out; the next commit is already in Gerrit, so it can speak for itself.","commit_id":"ba2e2c9754b8fc6c49293fac24a27f4f7510b5c2"},{"author":{"_account_id":7479,"name":"paul luse","email":"paul.e.luse@intel.com","username":"peluse"},"change_message_id":"83231a931b0843433b9f8be984f983821980f13b","unresolved":false,"context_lines":[{"line_number":730,"context_line":"        if req.method \u003d\u003d \u0027GET\u0027 and res.status_int \u003d\u003d 200 and \\"},{"line_number":731,"context_line":"           isinstance(env[\u0027wsgi.input\u0027], wsgi.Input):"},{"line_number":732,"context_line":"            app_iter \u003d getattr(res, \u0027app_iter\u0027, None)"},{"line_number":733,"context_line":"            checker \u003d getattr(app_iter, \u0027can_zero_copy_send\u0027, None)"},{"line_number":734,"context_line":"            if checker and checker():"},{"line_number":735,"context_line":"                # For any kind of zero-copy thing like sendfile or splice, we"},{"line_number":736,"context_line":"                # need the file descriptor. Eventlet doesn\u0027t provide a clean"}],"source_content_type":"text/x-python","patch_set":9,"id":"1abeadc6_382dbc8f","line":733,"updated":"2014-08-29 18:49:46.000000000","message":"can you explain briefly how this works?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"},{"author":{"_account_id":2622,"name":"Samuel Merritt","email":"spam+launchpad@andcheese.org","username":"torgomatic"},"change_message_id":"d068f50dc6e2ec9246cdeb675d6c884a84e764e8","unresolved":false,"context_lines":[{"line_number":730,"context_line":"        if req.method \u003d\u003d \u0027GET\u0027 and res.status_int \u003d\u003d 200 and \\"},{"line_number":731,"context_line":"           isinstance(env[\u0027wsgi.input\u0027], wsgi.Input):"},{"line_number":732,"context_line":"            app_iter \u003d getattr(res, \u0027app_iter\u0027, None)"},{"line_number":733,"context_line":"            checker \u003d getattr(app_iter, \u0027can_zero_copy_send\u0027, None)"},{"line_number":734,"context_line":"            if checker and checker():"},{"line_number":735,"context_line":"                # For any kind of zero-copy thing like sendfile or splice, we"},{"line_number":736,"context_line":"                # need the file descriptor. Eventlet doesn\u0027t provide a clean"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa98f980_16e11cfe","line":733,"in_reply_to":"1abeadc6_382dbc8f","updated":"2014-09-03 00:56:49.000000000","message":"The getattr() dance is to support diskfiles that know absolutely nothing about zero-copy.\n\nI could just call those methods and require other diskfiles to implement them as always returning false, but this seemed a little nicer. Maybe in the future we\u0027ll make it a required method?","commit_id":"3b863cbf14225b04cf70a17a50abbf515f16f632"}]}
