)]}'
{"swift/container/backend.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"99c3b0bf2532ec4e7e3dff9dad940e37465e82bc","unresolved":false,"context_lines":[{"line_number":2137,"context_line":"        # Use internal method so we don\u0027t try to update stats."},{"line_number":2138,"context_line":"        own_shard_range \u003d self._own_shard_range(no_default\u003dTrue)"},{"line_number":2139,"context_line":"        if not own_shard_range:"},{"line_number":2140,"context_line":"           return True  # Never been sharded"},{"line_number":2141,"context_line":""},{"line_number":2142,"context_line":"        if own_shard_range.deleted:"},{"line_number":2143,"context_line":"            # When shard ranges shrink, they get marked deleted"}],"source_content_type":"text/x-python","patch_set":1,"id":"bf51134e_3f1f9608","line":2140,"updated":"2020-06-26 01:04:35.000000000","message":"pep8: E111 indentation is not a multiple of four","commit_id":"fbee9f0615334203aabefed8e3d7fba58047936d"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2074,"context_line":"        if path:"},{"line_number":2075,"context_line":"            return \u0027X-Container-Sysmeta-Shard-Root\u0027, path"},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":"        return None, None"},{"line_number":2078,"context_line":""},{"line_number":2079,"context_line":"    def _load_root_info(self):"},{"line_number":2080,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_a103bd41","line":2077,"updated":"2020-07-10 21:48:43.000000000","message":"nice little method exraction","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2094,"context_line":"            # Ensure account/container get populated"},{"line_number":2095,"context_line":"            self._populate_instance_cache()"},{"line_number":2096,"context_line":"            self._root_account \u003d self.account"},{"line_number":2097,"context_line":"            self._root_container \u003d self.container"},{"line_number":2098,"context_line":"            return"},{"line_number":2099,"context_line":""},{"line_number":2100,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_24bcdbda","line":2097,"updated":"2020-07-10 21:48:43.000000000","message":"so this is still gunna be kinda wrong for deleted shards yeah?","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"896f66253b1b859a0d705a8f63edb8b1b45546e0","unresolved":false,"context_lines":[{"line_number":2094,"context_line":"            # Ensure account/container get populated"},{"line_number":2095,"context_line":"            self._populate_instance_cache()"},{"line_number":2096,"context_line":"            self._root_account \u003d self.account"},{"line_number":2097,"context_line":"            self._root_container \u003d self.container"},{"line_number":2098,"context_line":"            return"},{"line_number":2099,"context_line":""},{"line_number":2100,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_f985535b","line":2097,"in_reply_to":"bf51134e_24bcdbda","updated":"2020-07-13 21:14:35.000000000","message":"Yup -- but we have no authoritative way of knowing better. I guess we could *maybe* try parsing the .shards path...","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2102,"context_line":"                \u0027/\u0027 + path, 2, 2)"},{"line_number":2103,"context_line":"        except ValueError:"},{"line_number":2104,"context_line":"            raise ValueError(\"Expected %s to be of the form \""},{"line_number":2105,"context_line":"                             \"\u0027account/container\u0027, got %r\" % (hdr, path))"},{"line_number":2106,"context_line":""},{"line_number":2107,"context_line":"    @property"},{"line_number":2108,"context_line":"    def root_account(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_c4b19f46","line":2105,"updated":"2020-07-10 21:48:43.000000000","message":"in theory we could probably do this validation in the private method; but then we\u0027ve got the acc, cont already split up","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2130,"context_line":"        _, path \u003d self._get_root_meta()"},{"line_number":2131,"context_line":"        if path is not None:"},{"line_number":2132,"context_line":"            # We have metadata telling us where the root is; it\u0027s authoritative"},{"line_number":2133,"context_line":"            return self.path \u003d\u003d path"},{"line_number":2134,"context_line":""},{"line_number":2135,"context_line":"        # Else, we\u0027re either a root or a deleted shard."},{"line_number":2136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_a4ae2be4","line":2133,"updated":"2020-07-10 21:48:43.000000000","message":"gah, so here we don\u0027t want the path split","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"896f66253b1b859a0d705a8f63edb8b1b45546e0","unresolved":false,"context_lines":[{"line_number":2130,"context_line":"        _, path \u003d self._get_root_meta()"},{"line_number":2131,"context_line":"        if path is not None:"},{"line_number":2132,"context_line":"            # We have metadata telling us where the root is; it\u0027s authoritative"},{"line_number":2133,"context_line":"            return self.path \u003d\u003d path"},{"line_number":2134,"context_line":""},{"line_number":2135,"context_line":"        # Else, we\u0027re either a root or a deleted shard."},{"line_number":2136,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_f9b9d3cb","line":2133,"in_reply_to":"bf51134e_a4ae2be4","updated":"2020-07-13 21:14:35.000000000","message":"I mean -- we could use self.account / self.container -- w/e","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2137,"context_line":"        # Use internal method so we don\u0027t try to update stats."},{"line_number":2138,"context_line":"        own_shard_range \u003d self._own_shard_range(no_default\u003dTrue)"},{"line_number":2139,"context_line":"        if not own_shard_range:"},{"line_number":2140,"context_line":"            return True  # Never been sharded"},{"line_number":2141,"context_line":""},{"line_number":2142,"context_line":"        if own_shard_range.deleted:"},{"line_number":2143,"context_line":"            # When shard ranges shrink, they get marked deleted"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_2484db5d","line":2140,"updated":"2020-07-10 21:48:43.000000000","message":"stupid deleted metadata; i\u0027m sure there\u0027s an alternate reality where metadata could have a different lifecycle - but this makes total sense\n\nadditionally it makes the sharding probe test more robust to running with a very small reclaim age!","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"896f66253b1b859a0d705a8f63edb8b1b45546e0","unresolved":false,"context_lines":[{"line_number":2137,"context_line":"        # Use internal method so we don\u0027t try to update stats."},{"line_number":2138,"context_line":"        own_shard_range \u003d self._own_shard_range(no_default\u003dTrue)"},{"line_number":2139,"context_line":"        if not own_shard_range:"},{"line_number":2140,"context_line":"            return True  # Never been sharded"},{"line_number":2141,"context_line":""},{"line_number":2142,"context_line":"        if own_shard_range.deleted:"},{"line_number":2143,"context_line":"            # When shard ranges shrink, they get marked deleted"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_79a4a3a6","line":2140,"in_reply_to":"bf51134e_2484db5d","updated":"2020-07-13 21:14:35.000000000","message":"How low did you go? I ran into trouble if I went lower than around 10s or so; we\u0027d reclaim the sharding context metadata before we had a chance to actually finish sharding \u003e.\u003c","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"baa8c9e403dcb42e2852de5025ac75f8e7ec30b3","unresolved":false,"context_lines":[{"line_number":2145,"context_line":"        else:"},{"line_number":2146,"context_line":"            # But even when a root collapses, empties, and gets deleted, its"},{"line_number":2147,"context_line":"            # own_shard_range is left alive"},{"line_number":2148,"context_line":"            return True"},{"line_number":2149,"context_line":""},{"line_number":2150,"context_line":"    def _get_next_shard_range_upper(self, shard_size, last_upper\u003dNone):"},{"line_number":2151,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_647a5377","line":2148,"updated":"2020-07-10 21:48:43.000000000","message":"wow, really?  Is that by some necessity or just an accident we can rely on?  This branch is covered by tests, but it seems mostly incidental through is_empty()\n\nHonestly I don\u0027t even understand how a root has an \"own_shard_range\" when you say no_default\u003dTrue","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"896f66253b1b859a0d705a8f63edb8b1b45546e0","unresolved":false,"context_lines":[{"line_number":2145,"context_line":"        else:"},{"line_number":2146,"context_line":"            # But even when a root collapses, empties, and gets deleted, its"},{"line_number":2147,"context_line":"            # own_shard_range is left alive"},{"line_number":2148,"context_line":"            return True"},{"line_number":2149,"context_line":""},{"line_number":2150,"context_line":"    def _get_next_shard_range_upper(self, shard_size, last_upper\u003dNone):"},{"line_number":2151,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"bf51134e_d9a5efb6","line":2148,"in_reply_to":"bf51134e_647a5377","updated":"2020-07-13 21:14:35.000000000","message":"I think it\u0027s a matter of flow control. Sharder marks a range deleted after it\u0027s shrunk so it knows to delete the DB later. Root should never go deleting itself, so... leave it.\n\nAnother way of thinking about it: If an object update lands, what should happen? With a deleted (sharded) shard, it needs to go find the container it *should* be in and move it as a misplaced object. At the end of the day, it should stay deleted. With a deleted root, we should pop back into existence.\n\nTesting could probably use some improvements.","commit_id":"a4cf508a3859f6b37ac4d9767de38fc98cbea068"}]}
