)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"9b9b65df7c33541d3f6afb985cbe754cc6f9a032","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9579e575_9c474b34","updated":"2026-03-13 17:24:37.000000000","message":"recheck","commit_id":"e002bb0dbf033f20fc6e6e5c4cef86cfd79f04ea"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"26824f8ceb326c8a4d119bffe031061a50398717","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"505da2e8_99d3c5d2","updated":"2026-05-01 20:07:59.000000000","message":"Sorry, this is going to be a painful rebase, isn\u0027t it... I wanted to try to help, but I think I want to make sure we\u0027ve got consensus on `eventletflag` before doing much.","commit_id":"764a31a0bef197d5b258d438e91a9f8e92224dd2"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1b4f52439007934816cbe315e920395c363ff62a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"132977c5_201557ac","updated":"2026-03-23 10:10:32.000000000","message":"recheck","commit_id":"764a31a0bef197d5b258d438e91a9f8e92224dd2"}],"swift/common/bufferedhttp.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":233,"context_line":"    :param path: request path"},{"line_number":234,"context_line":"    :param headers: dictionary of headers"},{"line_number":235,"context_line":"    :param query_string: request query string"},{"line_number":236,"context_line":"    :param ssl: set True if SSL should be used (default: False)"},{"line_number":237,"context_line":"    :returns: HTTPConnection object"},{"line_number":238,"context_line":"    \"\"\""},{"line_number":239,"context_line":"    if isinstance(path, str):"}],"source_content_type":"text/x-python","patch_set":2,"id":"88b5f8b5_69cfefcd","line":236,"updated":"2026-03-12 00:32:25.000000000","message":"Could use a `:param timeout:`","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":233,"context_line":"    :param path: request path"},{"line_number":234,"context_line":"    :param headers: dictionary of headers"},{"line_number":235,"context_line":"    :param query_string: request query string"},{"line_number":236,"context_line":"    :param ssl: set True if SSL should be used (default: False)"},{"line_number":237,"context_line":"    :returns: HTTPConnection object"},{"line_number":238,"context_line":"    \"\"\""},{"line_number":239,"context_line":"    if isinstance(path, str):"}],"source_content_type":"text/x-python","patch_set":2,"id":"16a3c474_438f35c9","line":236,"in_reply_to":"88b5f8b5_69cfefcd","updated":"2026-03-13 16:24:43.000000000","message":"Yes!","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":262,"context_line":"    :param path: request path"},{"line_number":263,"context_line":"    :param headers: dictionary of headers"},{"line_number":264,"context_line":"    :param query_string: request query string"},{"line_number":265,"context_line":"    :param ssl: set True if SSL should be used (default: False)"},{"line_number":266,"context_line":"    :returns: HTTPConnection object"},{"line_number":267,"context_line":"    \"\"\""},{"line_number":268,"context_line":"    if not port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"c9f4eb7a_ed9a048a","line":265,"updated":"2026-03-12 00:32:25.000000000","message":"Here, too.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":262,"context_line":"    :param path: request path"},{"line_number":263,"context_line":"    :param headers: dictionary of headers"},{"line_number":264,"context_line":"    :param query_string: request query string"},{"line_number":265,"context_line":"    :param ssl: set True if SSL should be used (default: False)"},{"line_number":266,"context_line":"    :returns: HTTPConnection object"},{"line_number":267,"context_line":"    \"\"\""},{"line_number":268,"context_line":"    if not port:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1cf1765c_79dddddf","line":265,"in_reply_to":"c9f4eb7a_ed9a048a","updated":"2026-03-13 16:24:43.000000000","message":"Yes!","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/db.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":87,"context_line":"                if \u0027locked\u0027 not in str(e):"},{"line_number":88,"context_line":"                    raise"},{"line_number":89,"context_line":"            if deadline is not None and time.time() \u003e\u003d deadline:"},{"line_number":90,"context_line":"                raise LockTimeout(timeout, db_file)"},{"line_number":91,"context_line":"            sleep(retry_wait)"},{"line_number":92,"context_line":"            retry_wait \u003d min(retry_wait * 2, 0.05)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9ddf4f2e_17624276","line":90,"updated":"2026-03-12 00:32:25.000000000","message":"WDYT about having `Timeout` do some deadline tracking? So we could get a pattern more like\n```\nwith Timeout(timeout) as t:\n    while True:\n        # try to do work, break if we can\n        e.check_time()\n        time.sleep(...)\n```","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                if \u0027locked\u0027 not in str(e):"},{"line_number":88,"context_line":"                    raise"},{"line_number":89,"context_line":"            if deadline is not None and time.time() \u003e\u003d deadline:"},{"line_number":90,"context_line":"                raise LockTimeout(timeout, db_file)"},{"line_number":91,"context_line":"            sleep(retry_wait)"},{"line_number":92,"context_line":"            retry_wait \u003d min(retry_wait * 2, 0.05)"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"af049719_97584168","line":90,"in_reply_to":"9ddf4f2e_17624276","updated":"2026-03-13 16:24:43.000000000","message":"Yes, that would be better. Adding this in the next patchset. There are a few more \"with True\" within a \"with *Timeout\" cases that can be covered as well.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":127,"context_line":"        self.timeout \u003d timeout"},{"line_number":128,"context_line":"        self.db_file \u003d database"},{"line_number":129,"context_line":"        super(GreenDBConnection, self).__init__("},{"line_number":130,"context_line":"            database, timeout\u003d0, *args, **kwargs)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    def cursor(self, cls\u003dNone):"},{"line_number":133,"context_line":"        if cls is None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"f4e4dd53_e618a2ff","line":130,"updated":"2026-03-12 00:32:25.000000000","message":"Should we start passing the `timeout` kwarg through? At least, when `USE_EVENTLET` is false? I always kinda hated `_db_timeout`...","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/db_replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":411,"context_line":"                                        different_region\u003ddifferent_region):"},{"line_number":412,"context_line":"                    return False"},{"line_number":413,"context_line":"        http.timeout \u003d replicate_timeout or self.node_timeout"},{"line_number":414,"context_line":"        with Timeout(replicate_timeout or self.node_timeout):"},{"line_number":415,"context_line":"            response \u003d http.replicate(replicate_method, local_id,"},{"line_number":416,"context_line":"                                      os.path.basename(broker.db_file))"},{"line_number":417,"context_line":"        return response and 200 \u003c\u003d response.status \u003c 300"}],"source_content_type":"text/x-python","patch_set":2,"id":"93e7674d_88ebe189","line":414,"updated":"2026-03-12 00:32:25.000000000","message":"We can\u0027t say `socket\u003dhttp.sock` here? Or the other places where we call `http.replicate`?","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                                        different_region\u003ddifferent_region):"},{"line_number":412,"context_line":"                    return False"},{"line_number":413,"context_line":"        http.timeout \u003d replicate_timeout or self.node_timeout"},{"line_number":414,"context_line":"        with Timeout(replicate_timeout or self.node_timeout):"},{"line_number":415,"context_line":"            response \u003d http.replicate(replicate_method, local_id,"},{"line_number":416,"context_line":"                                      os.path.basename(broker.db_file))"},{"line_number":417,"context_line":"        return response and 200 \u003c\u003d response.status \u003c 300"}],"source_content_type":"text/x-python","patch_set":2,"id":"4f591357_959e3355","line":414,"in_reply_to":"93e7674d_88ebe189","updated":"2026-03-13 16:24:43.000000000","message":"Yes, good point. I think the change in line 174/175 is no longer needed than, and it\u0027s much cleaner and more in-line with the overall change.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/exceptions.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":26,"context_line":"            super(Timeout, self).__init__(*args, **new_kwargs)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"else:"},{"line_number":29,"context_line":"    class Timeout(BaseException):"},{"line_number":30,"context_line":"        def __init__(self, seconds\u003dNone, exception\u003dNone, socket\u003dNone):"},{"line_number":31,"context_line":"            self.seconds \u003d seconds"},{"line_number":32,"context_line":"            self.exception \u003d exception"}],"source_content_type":"text/x-python","patch_set":2,"id":"bca17187_f3e9deae","line":29,"range":{"start_line":29,"start_character":18,"end_line":29,"end_character":31},"updated":"2026-03-12 00:32:25.000000000","message":"Definitely want to go straight from `BaseException`, right? `TimeoutError` seems like a reasonably obvious alternative, but we consciously **don\u0027t** want to be inheriting from `Exception` or `OSError`, yeah?\n\nBut... when used as a context manager to get the *socket* to pop the error... that **will** raise a `TimeoutError` -- and I guess (hope?) things mostly just get handled?","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":26,"context_line":"            super(Timeout, self).__init__(*args, **new_kwargs)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"else:"},{"line_number":29,"context_line":"    class Timeout(BaseException):"},{"line_number":30,"context_line":"        def __init__(self, seconds\u003dNone, exception\u003dNone, socket\u003dNone):"},{"line_number":31,"context_line":"            self.seconds \u003d seconds"},{"line_number":32,"context_line":"            self.exception \u003d exception"}],"source_content_type":"text/x-python","patch_set":2,"id":"ded1a4e1_c9e273b3","line":29,"range":{"start_line":29,"start_character":18,"end_line":29,"end_character":31},"in_reply_to":"bca17187_f3e9deae","updated":"2026-03-13 16:24:43.000000000","message":"Yes. I stumbled upon this recently as well when working on getting unittests running/passing. In fact we need to catch some of these in exceptions.ChunkReadError, because socket.timeout would otherwise not raise a Timeout, but the ChunkedReadError. Will include that in the next patch for the Watchdog-replacement","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        def __enter__(self):"},{"line_number":36,"context_line":"            if self.seconds is not None and self.socket is not None \\"},{"line_number":37,"context_line":"                    and hasattr(self.socket, \u0027settimeout\u0027):"},{"line_number":38,"context_line":"                self.socket.settimeout(self.seconds)"},{"line_number":39,"context_line":"            return self"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"6d179622_d67490ee","line":37,"updated":"2026-03-12 00:32:25.000000000","message":"When would `self.socket` (be non-`None` and) *not* have `settimeout`?","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"        def __enter__(self):"},{"line_number":36,"context_line":"            if self.seconds is not None and self.socket is not None \\"},{"line_number":37,"context_line":"                    and hasattr(self.socket, \u0027settimeout\u0027):"},{"line_number":38,"context_line":"                self.socket.settimeout(self.seconds)"},{"line_number":39,"context_line":"            return self"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9645ea58_a34c54cc","line":37,"in_reply_to":"6d179622_d67490ee","updated":"2026-03-13 16:24:43.000000000","message":"Ouch. Should be never, but I think at one time I was accidentally overriding socket. In fact if this happens, there should be an error raised, because it is clearly wrong. Will change this.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":39,"context_line":"            return self"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        def __exit__(self, exc_type, exc_value, exc_traceback):"},{"line_number":42,"context_line":"            return False"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        def __str__(self):"},{"line_number":45,"context_line":"            if self.seconds is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"6d8a1d3b_aa8cc998","line":42,"updated":"2026-03-12 00:32:25.000000000","message":"Not going to try to reset the socket timeout to what was there before? I suppose the assumption is that the next time we use the socket, we\u0027ll be wrapping it in a `with Timeout(...):` again anyway.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            return self"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"        def __exit__(self, exc_type, exc_value, exc_traceback):"},{"line_number":42,"context_line":"            return False"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        def __str__(self):"},{"line_number":45,"context_line":"            if self.seconds is not None:"}],"source_content_type":"text/x-python","patch_set":2,"id":"6daa4ea9_c656d61e","line":42,"in_reply_to":"6d8a1d3b_aa8cc998","updated":"2026-03-13 16:24:43.000000000","message":"No, but I was thinking about this as well, because we might actually might continue using a socket without the Timeout ctx mgr? I will add a restore_timeout func, just to be save.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":44,"context_line":"        def __str__(self):"},{"line_number":45,"context_line":"            if self.seconds is not None:"},{"line_number":46,"context_line":"                return \u0027%s seconds\u0027 % self.seconds"},{"line_number":47,"context_line":"            return \u0027\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        def cancel(self):"},{"line_number":50,"context_line":"            pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3e55a786_4e9fc2c6","line":47,"updated":"2026-03-12 00:32:25.000000000","message":"Matches eventlet behavior, but still a bit of an odd return value...","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":46,"context_line":"                return \u0027%s seconds\u0027 % self.seconds"},{"line_number":47,"context_line":"            return \u0027\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        def cancel(self):"},{"line_number":50,"context_line":"            pass"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"from swift.common.utils.timestamp import Timestamp"}],"source_content_type":"text/x-python","patch_set":2,"id":"e093d1e6_a25fb238","line":49,"updated":"2026-03-12 00:32:25.000000000","message":"Only used in tests, yeah?","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                return \u0027%s seconds\u0027 % self.seconds"},{"line_number":47,"context_line":"            return \u0027\u0027"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"        def cancel(self):"},{"line_number":50,"context_line":"            pass"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"from swift.common.utils.timestamp import Timestamp"}],"source_content_type":"text/x-python","patch_set":2,"id":"6d9641fa_cb4d5b57","line":49,"in_reply_to":"e093d1e6_a25fb238","updated":"2026-03-13 16:24:43.000000000","message":"Yes, I\u0027ll add an inline comment. Will also make sure the socket timeout is reset at this point before getting to __exit__.\n\nMight be even worth to refactor the tests later on as well, but I wanted to avoid test changes as much as possible at the beginning.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":true,"context_lines":[{"line_number":45,"context_line":"            if self.seconds is not None:"},{"line_number":46,"context_line":"                if self.seconds \u003e 0:"},{"line_number":47,"context_line":"                    self.deadline \u003d time.monotonic() + self.seconds"},{"line_number":48,"context_line":"            if self.seconds is not None and self.socket is not None:"},{"line_number":49,"context_line":"                self.old_timeout \u003d self.socket.gettimeout()"},{"line_number":50,"context_line":"                self.socket.settimeout(self.seconds)"},{"line_number":51,"context_line":"            return self"}],"source_content_type":"text/x-python","patch_set":3,"id":"14897c2d_aaafec4c","line":48,"updated":"2026-03-13 16:24:43.000000000","message":"Ahh, could be intended, using one less if-condition.","commit_id":"e002bb0dbf033f20fc6e6e5c4cef86cfd79f04ea"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"26824f8ceb326c8a4d119bffe031061a50398717","unresolved":true,"context_lines":[{"line_number":33,"context_line":"            pass"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"else:"},{"line_number":36,"context_line":"    class Timeout(BaseException):"},{"line_number":37,"context_line":"        def __init__(self, seconds\u003dNone, socket\u003dNone, exception\u003dNone):"},{"line_number":38,"context_line":"            # exception is unused, kept to be compatible with eventlet and"},{"line_number":39,"context_line":"            # test/unit/obj/test_ssync.py::TestSsyncECReconstructorSyncJob"}],"source_content_type":"text/x-python","patch_set":4,"id":"7e0b9e60_411dd942","line":36,"updated":"2026-05-01 20:07:59.000000000","message":"OK, so I\u0027m pretty sure most of this hunk will be moving to `swift.common.concurrency` -- we\u0027ll just keep the `socket_timeout` import for the later hunk.","commit_id":"764a31a0bef197d5b258d438e91a9f8e92224dd2"}],"swift/common/memcached.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        self._tls_context \u003d tls_context"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def create(self):"},{"line_number":138,"context_line":"        addrs \u003d socket.getaddrinfo(self.host, self.port, socket.AF_UNSPEC,"},{"line_number":139,"context_line":"                                   socket.SOCK_STREAM)"},{"line_number":140,"context_line":"        family, socktype, proto, canonname, sockaddr \u003d addrs[0]"},{"line_number":141,"context_line":"        sock \u003d socket.socket(family, socket.SOCK_STREAM)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bcdf55d4_832aa397","line":138,"updated":"2026-03-12 00:32:25.000000000","message":"🤔 I wonder if we should try to get a timeout on this guy...\n\nEh, future work.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":255,"context_line":"    def _exception_occurred(self, server, e, cmd, conn_start_time,"},{"line_number":256,"context_line":"                            action\u003d\u0027talking\u0027, sock\u003dNone,"},{"line_number":257,"context_line":"                            fp\u003dNone, got_connection\u003dTrue):"},{"line_number":258,"context_line":"        if isinstance(e, Timeout):"},{"line_number":259,"context_line":"            self.logger.error("},{"line_number":260,"context_line":"                \"Timeout %(action)s to memcached: %(server)s\""},{"line_number":261,"context_line":"                \": with key_prefix %(key_prefix)s, method %(method)s, \""}],"source_content_type":"text/x-python","patch_set":2,"id":"33f9e67a_2f7b378b","line":258,"updated":"2026-03-12 00:32:25.000000000","message":"I wonder if this should pick up `TimeoutError`s (or, since those don\u0027t have a `seconds` attr, if there should be a similar-but-slightly-different stanza added)\n\nAt least they shouldn\u0027t fall down to the `self.logger.exception` case!","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/middleware/copy.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":217,"context_line":"                            with Timeout(self.yield_frequency):"},{"line_number":218,"context_line":"                                app_iter \u003d gt.wait()"},{"line_number":219,"context_line":"                        except Timeout:"},{"line_number":220,"context_line":"                            yield b\u0027 \u0027"},{"line_number":221,"context_line":"                except Exception as e:"},{"line_number":222,"context_line":"                    # Send back the status to the client if error"},{"line_number":223,"context_line":"                    self._response_status \u003d \u0027500 Internal Error\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"8012270c_4c878c68","line":220,"updated":"2026-03-12 00:32:25.000000000","message":"This pattern makes me nervous (since that `with` will  only ever cause a `raise` with `USE_EVENTLET` enabled), but I guess I should see what it looks like once we\u0027ve got the GreenThread replacement.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":217,"context_line":"                            with Timeout(self.yield_frequency):"},{"line_number":218,"context_line":"                                app_iter \u003d gt.wait()"},{"line_number":219,"context_line":"                        except Timeout:"},{"line_number":220,"context_line":"                            yield b\u0027 \u0027"},{"line_number":221,"context_line":"                except Exception as e:"},{"line_number":222,"context_line":"                    # Send back the status to the client if error"},{"line_number":223,"context_line":"                    self._response_status \u003d \u0027500 Internal Error\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"85dee360_d29ac084","line":220,"in_reply_to":"8012270c_4c878c68","updated":"2026-03-13 16:24:43.000000000","message":"Actually there is a timeout arg added  in the spawn-replacement patch to catch this.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/utils/__init__.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":1325,"context_line":"                    raise timeout_class(timeout, lockpath)"},{"line_number":1326,"context_line":"                if time_slept \u003e slowdown_at:"},{"line_number":1327,"context_line":"                    sleep_time \u003d slower_sleep_time"},{"line_number":1328,"context_line":"                sleep(sleep_time)"},{"line_number":1329,"context_line":"                time_slept +\u003d sleep_time"},{"line_number":1330,"context_line":"        yield True"},{"line_number":1331,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"df756582_9e95452b","line":1328,"updated":"2026-03-12 00:32:25.000000000","message":"This is where eventlet\u0027s `Timeout` would have popped, right? So I see two concerns:\n\n1. We can sleep past our deadline -- though only by the larger of 10ms or 1% of `timeout`\n2. If we *do* sleep past our deadline, we get one more crack at `_get_any_lock` before raising\n\nI\u0027m not sure either of those is terribly *significant*, but they seem worth calling out.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":1325,"context_line":"                    raise timeout_class(timeout, lockpath)"},{"line_number":1326,"context_line":"                if time_slept \u003e slowdown_at:"},{"line_number":1327,"context_line":"                    sleep_time \u003d slower_sleep_time"},{"line_number":1328,"context_line":"                sleep(sleep_time)"},{"line_number":1329,"context_line":"                time_slept +\u003d sleep_time"},{"line_number":1330,"context_line":"        yield True"},{"line_number":1331,"context_line":"    finally:"}],"source_content_type":"text/x-python","patch_set":2,"id":"1ca0991a_6310fd72","line":1328,"in_reply_to":"df756582_9e95452b","updated":"2026-03-13 16:24:43.000000000","message":"Yes. I think #2 can be fixed by moved the deadline check?\n\nUsing your idea on adding a check_time to Timeout we can nearly avoid this refactoring. Will add this in a follow up","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":1358,"context_line":"        fd \u003d os.open(filename, flags)"},{"line_number":1359,"context_line":"        file_obj \u003d os.fdopen(fd, mode)"},{"line_number":1360,"context_line":"        try:"},{"line_number":1361,"context_line":"            if USE_EVENTLET:"},{"line_number":1362,"context_line":"                with swift.common.exceptions.LockTimeout(timeout, filename):"},{"line_number":1363,"context_line":"                    while True:"},{"line_number":1364,"context_line":"                        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fa0f876_679730c4","line":1361,"updated":"2026-03-13 16:24:43.000000000","message":"Same here, using your idea on adding a check_time to Timeout we can nearly avoid this refactoring. Will add this in a follow up","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":2271,"context_line":"                            break"},{"line_number":2272,"context_line":"            except (GreenAsyncPileWaitallTimeout, StopIteration):"},{"line_number":2273,"context_line":"                pass"},{"line_number":2274,"context_line":"        else:"},{"line_number":2275,"context_line":"            deadline \u003d (time.time() + timeout) if timeout is not None \\"},{"line_number":2276,"context_line":"                else None"},{"line_number":2277,"context_line":"            while True:"}],"source_content_type":"text/x-python","patch_set":2,"id":"d2327ee6_c4bdfb57","line":2274,"updated":"2026-03-12 00:32:25.000000000","message":"So, a not-so-green async pile ;-)","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":2271,"context_line":"                            break"},{"line_number":2272,"context_line":"            except (GreenAsyncPileWaitallTimeout, StopIteration):"},{"line_number":2273,"context_line":"                pass"},{"line_number":2274,"context_line":"        else:"},{"line_number":2275,"context_line":"            deadline \u003d (time.time() + timeout) if timeout is not None \\"},{"line_number":2276,"context_line":"                else None"},{"line_number":2277,"context_line":"            while True:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5713783d_4e9c63dc","line":2274,"in_reply_to":"d2327ee6_c4bdfb57","updated":"2026-03-13 16:24:43.000000000","message":"Indeed :) Did not want to rename this yet.\n\nAgain, using your idea on adding a check_time to Timeout we can nearly avoid this refactoring. Will add this in a follow up","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/common/utils/logs.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":331,"context_line":"            elif exc.errno \u003d\u003d errno.EPIPE:"},{"line_number":332,"context_line":"                emsg \u003d \u0027Broken pipe\u0027"},{"line_number":333,"context_line":"            else:"},{"line_number":334,"context_line":"                call \u003d self._exception"},{"line_number":335,"context_line":"        elif isinstance(exc, swift.common.exceptions.Timeout):"},{"line_number":336,"context_line":"            emsg \u003d exc.__class__.__name__"},{"line_number":337,"context_line":"            detail \u003d \u0027%ss\u0027 % exc.seconds"}],"source_content_type":"text/x-python","patch_set":2,"id":"92bf894a_9e54fee0","line":334,"updated":"2026-03-12 00:32:25.000000000","message":"Huh. So when our `Timeout` causes a socket to raise `TimeoutError`s... I think they\u0027re all going to get *this* handling, rather than hitting `elif exc.errno \u003d\u003d errno.ETIMEDOUT` :-/\n```\n% USE_EVENTLET\u003d0 python\nPython 3.12.9 (main, May 21 2025, 15:37:30) [Clang 16.0.0 (clang-1600.0.26.6)] on darwin\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e from swift.common.bufferedhttp import http_connect\n\u003e\u003e\u003e try:\n...     http_connect(\u0027192.168.50.123\u0027, 8888, \u0027d0\u0027, 0, \u0027GET\u0027, \u0027foo/bar\u0027, timeout\u003d0.001)\n... except Exception as _:\n...     e \u003d _\n...\n\u003e\u003e\u003e e\nTimeoutError(\u0027timed out\u0027)\n\u003e\u003e\u003e e.errno\n\u003e\u003e\u003e isinstance(e, OSError)\nTrue\n\u003e\u003e\u003e print(e.errno)\nNone\n```","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":331,"context_line":"            elif exc.errno \u003d\u003d errno.EPIPE:"},{"line_number":332,"context_line":"                emsg \u003d \u0027Broken pipe\u0027"},{"line_number":333,"context_line":"            else:"},{"line_number":334,"context_line":"                call \u003d self._exception"},{"line_number":335,"context_line":"        elif isinstance(exc, swift.common.exceptions.Timeout):"},{"line_number":336,"context_line":"            emsg \u003d exc.__class__.__name__"},{"line_number":337,"context_line":"            detail \u003d \u0027%ss\u0027 % exc.seconds"}],"source_content_type":"text/x-python","patch_set":2,"id":"61e606a9_b857ca1e","line":334,"in_reply_to":"92bf894a_9e54fee0","updated":"2026-03-13 16:24:43.000000000","message":"You\u0027re right, good catch! We need to check if this is a socket.timeout as well. Will include that in the next update","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/container/replicator.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _fetch_and_merge_shard_ranges(self, http, broker):"},{"line_number":172,"context_line":"        http.timeout \u003d self.node_timeout"},{"line_number":173,"context_line":"        with Timeout(self.node_timeout):"},{"line_number":174,"context_line":"            response \u003d http.replicate(\u0027get_shard_ranges\u0027)"},{"line_number":175,"context_line":"        if response and is_success(response.status):"},{"line_number":176,"context_line":"            shards \u003d json.loads(response.data.decode(\u0027ascii\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"e8217607_878faaa1","line":173,"updated":"2026-03-12 00:32:25.000000000","message":"Can\u0027t say `socket\u003dhttp.sock`?","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _fetch_and_merge_shard_ranges(self, http, broker):"},{"line_number":172,"context_line":"        http.timeout \u003d self.node_timeout"},{"line_number":173,"context_line":"        with Timeout(self.node_timeout):"},{"line_number":174,"context_line":"            response \u003d http.replicate(\u0027get_shard_ranges\u0027)"},{"line_number":175,"context_line":"        if response and is_success(response.status):"},{"line_number":176,"context_line":"            shards \u003d json.loads(response.data.decode(\u0027ascii\u0027))"}],"source_content_type":"text/x-python","patch_set":2,"id":"4818d691_f6bec7b9","line":173,"in_reply_to":"e8217607_878faaa1","updated":"2026-03-13 16:24:43.000000000","message":"Done","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/container/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":270,"context_line":"                if account_response.status \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":271,"context_line":"                    account_404s +\u003d 1"},{"line_number":272,"context_line":"                elif not is_success(account_response.status):"},{"line_number":273,"context_line":"                    self.logger.error("},{"line_number":274,"context_line":"                        \u0027ERROR Account update failed \u0027"},{"line_number":275,"context_line":"                        \u0027with %(ip)s:%(port)s/%(device)s (will retry \u0027"},{"line_number":276,"context_line":"                        \u0027later): Response %(status)s %(reason)s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"dbddb215_19e77265","line":273,"updated":"2026-03-12 00:32:25.000000000","message":"There\u0027s a sneaky bug fix! Used to be, logging could pop the timeout! (At least, if it was slow enough.)","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":true,"context_lines":[{"line_number":270,"context_line":"                if account_response.status \u003d\u003d HTTP_NOT_FOUND:"},{"line_number":271,"context_line":"                    account_404s +\u003d 1"},{"line_number":272,"context_line":"                elif not is_success(account_response.status):"},{"line_number":273,"context_line":"                    self.logger.error("},{"line_number":274,"context_line":"                        \u0027ERROR Account update failed \u0027"},{"line_number":275,"context_line":"                        \u0027with %(ip)s:%(port)s/%(device)s (will retry \u0027"},{"line_number":276,"context_line":"                        \u0027later): Response %(status)s %(reason)s\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"41f14693_d979ef0d","line":273,"in_reply_to":"dbddb215_19e77265","updated":"2026-03-13 16:24:43.000000000","message":"Uh, right! That\u0027s one of the cases where this implementation slightly differs.\n\nNow this brings up the concern that logging is no longer covered by the timeout. Hmm...","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}],"swift/obj/reconstructor.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c61d0b9660fc44a44fc2699422e559ab9b330c55","unresolved":true,"context_lines":[{"line_number":919,"context_line":"                # Note: this timeout behaviour is changed. Total timeout for"},{"line_number":920,"context_line":"                # http_connect + getresponse was self.http_timeout before the"},{"line_number":921,"context_line":"                # eventlet removal refactoring, now it\u0027s http_timeout for each"},{"line_number":922,"context_line":"                # of them."},{"line_number":923,"context_line":"                conn \u003d http_connect("},{"line_number":924,"context_line":"                    node[\u0027replication_ip\u0027], node[\u0027replication_port\u0027],"},{"line_number":925,"context_line":"                    node[\u0027device\u0027], job[\u0027partition\u0027], \u0027REPLICATE\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"66bca04d_d3d3a667","line":922,"updated":"2026-03-12 00:32:25.000000000","message":"Really, it was kind of weird before -- I don\u0027t think we generally combined those two timeouts like that -- though I see you left a similar comment in the replicator.\n\nAnd we even already have a `conn_timeout` in the config ... https://review.opendev.org/c/openstack/swift/+/980178","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"},{"author":{"_account_id":6968,"name":"Christian Schwede","email":"cschwede@nvidia.com","username":"cschwede"},"change_message_id":"1311ff2e66ca6ea56a4782205038d21382f2e675","unresolved":false,"context_lines":[{"line_number":919,"context_line":"                # Note: this timeout behaviour is changed. Total timeout for"},{"line_number":920,"context_line":"                # http_connect + getresponse was self.http_timeout before the"},{"line_number":921,"context_line":"                # eventlet removal refactoring, now it\u0027s http_timeout for each"},{"line_number":922,"context_line":"                # of them."},{"line_number":923,"context_line":"                conn \u003d http_connect("},{"line_number":924,"context_line":"                    node[\u0027replication_ip\u0027], node[\u0027replication_port\u0027],"},{"line_number":925,"context_line":"                    node[\u0027device\u0027], job[\u0027partition\u0027], \u0027REPLICATE\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"2b0b83b8_da743fdd","line":922,"in_reply_to":"66bca04d_d3d3a667","updated":"2026-03-13 16:24:43.000000000","message":"Thx, will use that. Much better.","commit_id":"4d90e61e04dcf1f15a9e0215ef0e2036a52a735f"}]}
