)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d7545b1149d7b81d7f8f08833363494b8033b42f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"6633ce39_0deec985","updated":"2025-08-25 17:32:27.000000000","message":"The more I think about this, the more I fee like it\u0027s a miracle we don\u0027t have more trouble with ring reloading. I feel like this *maybe* makes it more likely for issues to arise? Makes me **very** glad we (Nvidia) don\u0027t try to re-use device IDs, though.\n\nMakes me nervous that we may see reports of `IndexError`s popping in ring code with the devs-list-trimming introduced with the ring v2 patch...","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"}],"swift/common/ring/ring.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d7545b1149d7b81d7f8f08833363494b8033b42f","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            if part \u003c len(r2p2d):"},{"line_number":492,"context_line":"                dev_id \u003d r2p2d[part]"},{"line_number":493,"context_line":"                if dev_id not in seen_ids:"},{"line_number":494,"context_line":"                    part_nodes.append(self.devs[dev_id])"},{"line_number":495,"context_line":"                    seen_ids.add(dev_id)"},{"line_number":496,"context_line":"        return [dict(node, index\u003di) for i, node in enumerate(part_nodes)]"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"23b4c1ac_aa021a13","side":"PARENT","line":494,"updated":"2025-08-25 17:32:27.000000000","message":"Huh. So I was going to push back on the switch from `self._devs` to `self.devs` in `get_more_nodes` -- it seemed weird to me that we might yield out some devices from ring version N, then reload and yield out more devices from ring N+1. But\n\n1. we were going to run into that problem there *anyway* with all the other pass-through-to-`RingData` accesses,\n2. we could bump into a similar problem (even on master) if there\u0027s a reload tripped on some *other* request while waiting to see if we need more handoffs, and\n3. apparently we can already run into a similar problem today on master within a single call to `_get_part_nodes`!\n\nI think I\u0027d feel better with almost the opposite sort of an approach: have these functions grab a reference to the current `RingData` (probably through some getter function that handles the reload), then explicitly access things off it so we know we\u0027re looking at a coherent structure.\n\nI\u0027m less and less in favor of the properties, even as they are on master -- it\u0027s too easy to think that something is a cheap, simple operation when the whole world might be about to change out from under us.","commit_id":"0bdc807484e0c5b8089c1012196357dd8df28197"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"70a57050d310f51ee3cac8a1bcf3c37c2ba0851b","unresolved":true,"context_lines":[{"line_number":491,"context_line":"            if part \u003c len(r2p2d):"},{"line_number":492,"context_line":"                dev_id \u003d r2p2d[part]"},{"line_number":493,"context_line":"                if dev_id not in seen_ids:"},{"line_number":494,"context_line":"                    part_nodes.append(self.devs[dev_id])"},{"line_number":495,"context_line":"                    seen_ids.add(dev_id)"},{"line_number":496,"context_line":"        return [dict(node, index\u003di) for i, node in enumerate(part_nodes)]"},{"line_number":497,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"739f9418_279714e6","side":"PARENT","line":494,"in_reply_to":"23b4c1ac_aa021a13","updated":"2025-08-29 06:30:56.000000000","message":"Do we want to add some kind of reload lock that we can set when certain calls and iterators are made. \n\nCould lead to some slightly stale ring reads if an iterator takes too long somehwere.. but might be worth it to better know things wont change from underneath us.","commit_id":"0bdc807484e0c5b8089c1012196357dd8df28197"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d7545b1149d7b81d7f8f08833363494b8033b42f","unresolved":true,"context_lines":[{"line_number":488,"context_line":"        \"\"\""},{"line_number":489,"context_line":"        key \u003d hash_path(account, container, obj, raw_digest\u003dTrue)"},{"line_number":490,"context_line":"        if time() \u003e self._rtime:"},{"line_number":491,"context_line":"            self._reload()"},{"line_number":492,"context_line":"        part \u003d struct.unpack_from(\u0027\u003eI\u0027, key)[0] \u003e\u003e self._part_shift"},{"line_number":493,"context_line":"        return part"},{"line_number":494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"d1f3bf90_e26e484b","line":491,"updated":"2025-08-25 17:32:27.000000000","message":"We should be able to take this out now, and instead rely on the check implicit in `self._part_shift`, yeah?","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"70a57050d310f51ee3cac8a1bcf3c37c2ba0851b","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        \"\"\""},{"line_number":489,"context_line":"        key \u003d hash_path(account, container, obj, raw_digest\u003dTrue)"},{"line_number":490,"context_line":"        if time() \u003e self._rtime:"},{"line_number":491,"context_line":"            self._reload()"},{"line_number":492,"context_line":"        part \u003d struct.unpack_from(\u0027\u003eI\u0027, key)[0] \u003e\u003e self._part_shift"},{"line_number":493,"context_line":"        return part"},{"line_number":494,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fe6717a0_fa85554c","line":491,"in_reply_to":"d1f3bf90_e26e484b","updated":"2025-08-29 06:30:56.000000000","message":"Done","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d7545b1149d7b81d7f8f08833363494b8033b42f","unresolved":true,"context_lines":[{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        if time() \u003e self._rtime:"},{"line_number":508,"context_line":"            self._reload()"},{"line_number":509,"context_line":"        return self._get_part_nodes(part)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def get_nodes(self, account, container\u003dNone, obj\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"31feae98_9aea5ffa","line":508,"updated":"2025-08-25 17:32:27.000000000","message":"And here -- with multiple `self.devs` accesses in `_get_part_nodes`, we could just rely on that, yeah? And probably rename it to `get_part_nodes`.","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"70a57050d310f51ee3cac8a1bcf3c37c2ba0851b","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        \"\"\""},{"line_number":506,"context_line":""},{"line_number":507,"context_line":"        if time() \u003e self._rtime:"},{"line_number":508,"context_line":"            self._reload()"},{"line_number":509,"context_line":"        return self._get_part_nodes(part)"},{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def get_nodes(self, account, container\u003dNone, obj\u003dNone):"}],"source_content_type":"text/x-python","patch_set":2,"id":"f64615f9_283ae95a","line":508,"in_reply_to":"31feae98_9aea5ffa","updated":"2025-08-29 06:30:56.000000000","message":"Done","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"d7545b1149d7b81d7f8f08833363494b8033b42f","unresolved":true,"context_lines":[{"line_number":555,"context_line":"        See :func:`get_nodes` for a description of the node dicts."},{"line_number":556,"context_line":"        \"\"\""},{"line_number":557,"context_line":"        if time() \u003e self._rtime:"},{"line_number":558,"context_line":"            self._reload()"},{"line_number":559,"context_line":"        primary_nodes \u003d self._get_part_nodes(part)"},{"line_number":560,"context_line":"        used \u003d set(d[\u0027id\u0027] for d in primary_nodes)"},{"line_number":561,"context_line":"        index \u003d count()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ce5ea930_57369d32","line":558,"updated":"2025-08-25 17:32:27.000000000","message":"Do we still need this?","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"70a57050d310f51ee3cac8a1bcf3c37c2ba0851b","unresolved":false,"context_lines":[{"line_number":555,"context_line":"        See :func:`get_nodes` for a description of the node dicts."},{"line_number":556,"context_line":"        \"\"\""},{"line_number":557,"context_line":"        if time() \u003e self._rtime:"},{"line_number":558,"context_line":"            self._reload()"},{"line_number":559,"context_line":"        primary_nodes \u003d self._get_part_nodes(part)"},{"line_number":560,"context_line":"        used \u003d set(d[\u0027id\u0027] for d in primary_nodes)"},{"line_number":561,"context_line":"        index \u003d count()"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff037e85_6ad466ac","line":558,"in_reply_to":"ce5ea930_57369d32","updated":"2025-08-29 06:30:56.000000000","message":"Done","commit_id":"8673e38dc06154592626870f90c84b3c4f3cf28f"}]}
