)]}'
{"swift/common/utils.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b78b0115526cbb1b5866c940857cf2b1877b9a63","unresolved":false,"context_lines":[{"line_number":4281,"context_line":"    STATES_BY_NAME \u003d dict((v, k) for k, v in STATES.items())"},{"line_number":4282,"context_line":""},{"line_number":4283,"context_line":"    class OuterBound(object):"},{"line_number":4284,"context_line":"        def __eq__(self, other):"},{"line_number":4285,"context_line":"            return isinstance(other, type(self)) or other is \u0027\u0027"},{"line_number":4286,"context_line":""},{"line_number":4287,"context_line":"        def __str__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_34a6faac","line":4284,"updated":"2018-01-18 01:50:40.000000000","message":"If we\u0027re defining __eq__, we should define __ne__, too.\n\n\u003e\u003e\u003e from swift.common.utils import *\n\u003e\u003e\u003e ShardRange.MinBound() \u003d\u003d ShardRange.MinBound()\nTrue\n\u003e\u003e\u003e ShardRange.MinBound() !\u003d ShardRange.MinBound()\nTrue\n\nYou\u0027ve learned this lesson before :P https://github.com/openstack/swift/commit/a1776b9","commit_id":"3cb2c13ab122b220e546ab4f644b80f3a06ff50b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a6d9d3560f5208f285a85d3630dae688c435cae2","unresolved":false,"context_lines":[{"line_number":4281,"context_line":"    STATES_BY_NAME \u003d dict((v, k) for k, v in STATES.items())"},{"line_number":4282,"context_line":""},{"line_number":4283,"context_line":"    class OuterBound(object):"},{"line_number":4284,"context_line":"        def __eq__(self, other):"},{"line_number":4285,"context_line":"            return isinstance(other, type(self)) or other is \u0027\u0027"},{"line_number":4286,"context_line":""},{"line_number":4287,"context_line":"        def __str__(self):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_13b2e249","line":4284,"in_reply_to":"7f96bb07_34a6faac","updated":"2018-01-18 15:09:11.000000000","message":"ouch! :) I blame the docs [1]\n\n[1] https://docs.python.org/2/library/functools.html#functools.total_ordering","commit_id":"3cb2c13ab122b220e546ab4f644b80f3a06ff50b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"68e548ccac4dbdb791473f63e81505ce7b5f65bf","unresolved":false,"context_lines":[{"line_number":4404,"context_line":""},{"line_number":4405,"context_line":"    @lower.setter"},{"line_number":4406,"context_line":"    def lower(self, value):"},{"line_number":4407,"context_line":"        if not value and value is not ShardRange.MAX:"},{"line_number":4408,"context_line":"            value \u003d ShardRange.MIN"},{"line_number":4409,"context_line":"        if not isinstance(value, (string_types, ShardRange.OuterBound)):"},{"line_number":4410,"context_line":"            raise TypeError(\u0027lower must be a string\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_de43133e","line":4407,"range":{"start_line":4407,"start_character":49,"end_line":4407,"end_character":52},"updated":"2018-01-18 20:13:33.000000000","message":"Good catch!\n\nWell... maybe... I\u0027m not actually sure I should be allowed to do this:\n\n \u003e\u003e\u003e x\u003dShardRange(\u0027x/y\u0027, 1, ShardRange.MAX, ShardRange.MAX)\n \u003e\u003e\u003e x\n ShardRange\u003c\u003cswift.common.utils.MaxBound object at 0x7f4287e84390\u003e to \u003cswift.common.utils.MaxBound object at 0x7f4287e84390\u003e as of 0000000001.00000, (0, 0) as of 0000000001.00000, created as of 0000000001.00000\u003e\n \u003e\u003e\u003e \u0027z\u0027 in x\n False\n\nMaybe it\u0027s just a matter of using ShardRange.MinBound in the isinstance below?\n\nAlso, this is reminding me that we may want to define __repr__ as well...","commit_id":"7e256497241193ddda03124b6ba53974e884be40"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"439d0fc1d0b7cb0851c6f8606226e7b6cbf15ce0","unresolved":false,"context_lines":[{"line_number":4404,"context_line":""},{"line_number":4405,"context_line":"    @lower.setter"},{"line_number":4406,"context_line":"    def lower(self, value):"},{"line_number":4407,"context_line":"        if not value and value is not ShardRange.MAX:"},{"line_number":4408,"context_line":"            value \u003d ShardRange.MIN"},{"line_number":4409,"context_line":"        if not isinstance(value, (string_types, ShardRange.OuterBound)):"},{"line_number":4410,"context_line":"            raise TypeError(\u0027lower must be a string\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f96bb07_4773a4b2","line":4407,"range":{"start_line":4407,"start_character":49,"end_line":4407,"end_character":52},"in_reply_to":"7f96bb07_de43133e","updated":"2018-01-19 09:42:31.000000000","message":"In back of my mind is that one day I might like to have a \u0027closed\u0027 shard range i.e. one that spans none of the namespace, so this was kinda deliberate to allow a shard range MAX-\u003eMAX (or MIN-\u003eMIN although in my scheming it\u0027s the MAX-.MAX I can imagine using)\n\n... the scenario would be for example while sharding, using a shard range to represent the \u0027donating\u0027 container, such that the donor shard range reduces in namespace as shards are found and cleaved. This would remove need for the container server to synthesize a filler shard range (see following patch [1]) but might also contribute to not needing to rely on sysmeta to hold sharding related metadata.\n\nIDK, it\u0027s formative thinking, but that\u0027s what motivated allowing the \u0027closed\u0027 namespace\n\n[1] https://review.openstack.org/#/c/533201/4/swift/container/server.py","commit_id":"7e256497241193ddda03124b6ba53974e884be40"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"de8227c215f7587a1bf91ef89a4c1e4fd4cf1f7d","unresolved":false,"context_lines":[{"line_number":4291,"context_line":"            return \u0027\u0027"},{"line_number":4292,"context_line":""},{"line_number":4293,"context_line":"        def __repr__(self):"},{"line_number":4294,"context_line":"            return \"\u0027\u0027\""},{"line_number":4295,"context_line":""},{"line_number":4296,"context_line":"        def __bool__(self):"},{"line_number":4297,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f96bb07_76e2ff03","line":4294,"updated":"2018-01-20 00:33:44.000000000","message":"I almost wonder if we should do this in the subclasses and\n\n return \u0027MIN\u0027\n\nor MAX, no quotes...","commit_id":"e6c1b06e5fd597e81095654b4a83f2dd9b0f7c56"}],"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b78b0115526cbb1b5866c940857cf2b1877b9a63","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        def do_query():"},{"line_number":1756,"context_line":"            sql \u003d \u0027SELECT name FROM object WHERE deleted\u003d0 \u0027"},{"line_number":1757,"context_line":"            if last_upper:"},{"line_number":1758,"context_line":"                sql +\u003d \"AND name \u003e \u0027%s\u0027 \" % last_upper"},{"line_number":1759,"context_line":"            sql +\u003d \"ORDER BY name LIMIT 1 OFFSET %d\" % (shard_size - 1)"},{"line_number":1760,"context_line":"            row \u003d connection.execute(sql).fetchone()"},{"line_number":1761,"context_line":"            return row[\u0027name\u0027] if row else None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_d4df960a","line":1758,"range":{"start_line":1758,"start_character":44,"end_line":1758,"end_character":54},"updated":"2018-01-18 01:50:40.000000000","message":"What happens when\n\n \"\u0027\" in last_upper\n\n?","commit_id":"3cb2c13ab122b220e546ab4f644b80f3a06ff50b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a6d9d3560f5208f285a85d3630dae688c435cae2","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        def do_query():"},{"line_number":1756,"context_line":"            sql \u003d \u0027SELECT name FROM object WHERE deleted\u003d0 \u0027"},{"line_number":1757,"context_line":"            if last_upper:"},{"line_number":1758,"context_line":"                sql +\u003d \"AND name \u003e \u0027%s\u0027 \" % last_upper"},{"line_number":1759,"context_line":"            sql +\u003d \"ORDER BY name LIMIT 1 OFFSET %d\" % (shard_size - 1)"},{"line_number":1760,"context_line":"            row \u003d connection.execute(sql).fetchone()"},{"line_number":1761,"context_line":"            return row[\u0027name\u0027] if row else None"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_33791ec7","line":1758,"range":{"start_line":1758,"start_character":44,"end_line":1758,"end_character":54},"in_reply_to":"7f96bb07_d4df960a","updated":"2018-01-18 15:09:11.000000000","message":"Done","commit_id":"3cb2c13ab122b220e546ab4f644b80f3a06ff50b"}]}
