)]}'
{"swift/container/backend.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6177b61b9bdbf4b7d24539c53c25c0156843173c","unresolved":false,"context_lines":[{"line_number":1690,"context_line":"    def get_shard_usage(self):"},{"line_number":1691,"context_line":"        shard_ranges \u003d self.get_shard_ranges("},{"line_number":1692,"context_line":"            states\u003d[ShardRange.ACTIVE, ShardRange.SHRINKING,"},{"line_number":1693,"context_line":"                    ShardRange.EXPANDING])"},{"line_number":1694,"context_line":"        return {\u0027bytes_used\u0027: sum([sr.bytes_used for sr in shard_ranges]),"},{"line_number":1695,"context_line":"                \u0027object_count\u0027: sum([sr.object_count for sr in shard_ranges])}"},{"line_number":1696,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_9922fca3","line":1693,"updated":"2018-03-12 22:57:25.000000000","message":"Now I\u0027m wanting to find a way to pull this from the \u0027listing\u0027 alias in server.py...","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"}],"swift/container/sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6177b61b9bdbf4b7d24539c53c25c0156843173c","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                        # a persisted shard range for itself and it\u0027s ok to"},{"line_number":649,"context_line":"                        # send the update"},{"line_number":650,"context_line":"                        shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":651,"context_line":"                                        if sr.name !\u003d broker.root_path]"},{"line_number":652,"context_line":"                        # TODO: the new shard ranges may have existed for some"},{"line_number":653,"context_line":"                        # time and already be updating the root with their"},{"line_number":654,"context_line":"                        # usage e.g. multiple cycles before we finished"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_79d8487e","side":"PARENT","line":651,"updated":"2018-03-12 22:57:25.000000000","message":"I was thinking at first that the TODO was addressed in https://review.openstack.org/#/c/550246/7/swift/container/backend.py -- but the more I think about it, that\u0027s not *quite* the condition. So, why don\u0027t we want this anymore?","commit_id":"7513adf0e3efcbb5cb0622be94c9bdba13ce838b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"b0b8dd39d33d79c27cb6334968fdc156b435d981","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                        # a persisted shard range for itself and it\u0027s ok to"},{"line_number":649,"context_line":"                        # send the update"},{"line_number":650,"context_line":"                        shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":651,"context_line":"                                        if sr.name !\u003d broker.root_path]"},{"line_number":652,"context_line":"                        # TODO: the new shard ranges may have existed for some"},{"line_number":653,"context_line":"                        # time and already be updating the root with their"},{"line_number":654,"context_line":"                        # usage e.g. multiple cycles before we finished"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_9775d7cd","side":"PARENT","line":651,"in_reply_to":"df7087c5_414d3dc2","updated":"2018-03-13 10:48:43.000000000","message":"wow, I typed that before today\u0027s coffee had kicked in :(\n\nIgnore the reference to the exact line in the other review. The significant point is that there *is* now the concept of the root having a db record for its own shard range and it is ok for us to update that here. In fact IIRC we *need* to update the root to move it out of expanding state after a shrink completes.","commit_id":"7513adf0e3efcbb5cb0622be94c9bdba13ce838b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8ffc5f5d6a9f4489cdcab50988a46e21d041334","unresolved":false,"context_lines":[{"line_number":648,"context_line":"                        # a persisted shard range for itself and it\u0027s ok to"},{"line_number":649,"context_line":"                        # send the update"},{"line_number":650,"context_line":"                        shard_ranges \u003d [sr for sr in shard_ranges"},{"line_number":651,"context_line":"                                        if sr.name !\u003d broker.root_path]"},{"line_number":652,"context_line":"                        # TODO: the new shard ranges may have existed for some"},{"line_number":653,"context_line":"                        # time and already be updating the root with their"},{"line_number":654,"context_line":"                        # usage e.g. multiple cycles before we finished"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_414d3dc2","side":"PARENT","line":651,"in_reply_to":"df7087c5_79d8487e","updated":"2018-03-13 09:37:39.000000000","message":"because this is now true \n\n\u0027root will start to maintain a persisted shard range for itself and it\u0027s ok to send the update\u0027\n\nsince here https://review.openstack.org/#/c/550246/7/swift/container/sharder.py@1174\n\nbefore then, the dummy shard range really was a dummy synthesised from sysmeta. Now it\u0027s the actual root\u0027s own shard range","commit_id":"7513adf0e3efcbb5cb0622be94c9bdba13ce838b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6177b61b9bdbf4b7d24539c53c25c0156843173c","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            return"},{"line_number":364,"context_line":"        if own_shard_range.state \u003d\u003d ShardRange.EXPANDING:"},{"line_number":365,"context_line":"            self.logger.debug(\u0027Not looking for misplaced objects in expanding \u0027"},{"line_number":366,"context_line":"                              \u0027container %s (%s)\u0027, broker.path, broker.db_file)"},{"line_number":367,"context_line":"            return"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        self.logger.debug(\u0027Looking for misplaced objects in %s (%s)\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_194b4c59","line":366,"updated":"2018-03-12 22:57:25.000000000","message":"Makes me a little nervous... How certain are we that we won\u0027t be stuck in EXPANDING indefinitely? Can we at least work through misplaced objects *above* our range?","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8ffc5f5d6a9f4489cdcab50988a46e21d041334","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            return"},{"line_number":364,"context_line":"        if own_shard_range.state \u003d\u003d ShardRange.EXPANDING:"},{"line_number":365,"context_line":"            self.logger.debug(\u0027Not looking for misplaced objects in expanding \u0027"},{"line_number":366,"context_line":"                              \u0027container %s (%s)\u0027, broker.path, broker.db_file)"},{"line_number":367,"context_line":"            return"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        self.logger.debug(\u0027Looking for misplaced objects in %s (%s)\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_3cb63040","line":366,"in_reply_to":"df7087c5_194b4c59","updated":"2018-03-13 09:37:39.000000000","message":"me too! but this is the best I could come up with so far :(\n\nyes, we could consider objects outside of own range and perhaps also just pass over objects in shrinking ranges that the acceptor knows about. But at the moment we don\u0027t have anything that tells us that shard x is shrinking to shard y.\n\nThere\u0027s also a race (card is on trello) when misplaced objects runs after objects have been replicated but before the shard ranges have :/","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"10903ae94e7c22b69dff789a233726dce828239b","unresolved":false,"context_lines":[{"line_number":363,"context_line":"            return"},{"line_number":364,"context_line":"        if own_shard_range.state \u003d\u003d ShardRange.EXPANDING:"},{"line_number":365,"context_line":"            self.logger.debug(\u0027Not looking for misplaced objects in expanding \u0027"},{"line_number":366,"context_line":"                              \u0027container %s (%s)\u0027, broker.path, broker.db_file)"},{"line_number":367,"context_line":"            return"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"        self.logger.debug(\u0027Looking for misplaced objects in %s (%s)\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_3cee30ed","line":366,"in_reply_to":"df7087c5_3cb63040","updated":"2018-03-13 09:40:16.000000000","message":"hmmm, problem is the acceptor does not know yet what its future namespace will be, so anything smarter than this blunt tool would need to be informed by shrinking shard ranges in its db.","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6177b61b9bdbf4b7d24539c53c25c0156843173c","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"                # as an acceptor; state_timestamp defines new epoch for donor"},{"line_number":1050,"context_line":"                # and new timestamp for the expanded acceptor below."},{"line_number":1051,"context_line":"                modified_shard_ranges.append(donor)"},{"line_number":1052,"context_line":"            broker.merge_shard_ranges(modified_shard_ranges)"},{"line_number":1053,"context_line":"            if acceptor !\u003d dummy_shard_range:"},{"line_number":1054,"context_line":"                # Update the acceptor container with its expanding state to"},{"line_number":1055,"context_line":"                # prevent it treating object updates redirected from the donor"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_19034cba","line":1052,"updated":"2018-03-12 22:57:25.000000000","message":"Are we sure we should be doing this when acceptor \u003d\u003d dummy_shard_range?","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8ffc5f5d6a9f4489cdcab50988a46e21d041334","unresolved":false,"context_lines":[{"line_number":1049,"context_line":"                # as an acceptor; state_timestamp defines new epoch for donor"},{"line_number":1050,"context_line":"                # and new timestamp for the expanded acceptor below."},{"line_number":1051,"context_line":"                modified_shard_ranges.append(donor)"},{"line_number":1052,"context_line":"            broker.merge_shard_ranges(modified_shard_ranges)"},{"line_number":1053,"context_line":"            if acceptor !\u003d dummy_shard_range:"},{"line_number":1054,"context_line":"                # Update the acceptor container with its expanding state to"},{"line_number":1055,"context_line":"                # prevent it treating object updates redirected from the donor"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_5c8c447e","line":1052,"in_reply_to":"df7087c5_19034cba","updated":"2018-03-13 09:37:39.000000000","message":"Yes, we do want the root to go to EXPANDING when it is the acceptor.\n\nI should rename dummy_shard_range to root_shard_range - it is no longer a \u0027dummy\u0027.","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"6177b61b9bdbf4b7d24539c53c25c0156843173c","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"            if acceptor !\u003d dummy_shard_range:"},{"line_number":1054,"context_line":"                # Update the acceptor container with its expanding state to"},{"line_number":1055,"context_line":"                # prevent it treating object updates redirected from the donor"},{"line_number":1056,"context_line":"                # as misplaced."},{"line_number":1057,"context_line":"                self._update_shard_ranges("},{"line_number":1058,"context_line":"                    acceptor.account, acceptor.container, [acceptor])"},{"line_number":1059,"context_line":"                # Make a copy the acceptor shard range to send to the donor"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_b95d80ea","line":1056,"updated":"2018-03-12 22:57:25.000000000","message":"The updated state will keep us from doing anything in misplaced_objects, sure... but will the acceptor eat new async pendings, or just redirect?","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a8ffc5f5d6a9f4489cdcab50988a46e21d041334","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"            if acceptor !\u003d dummy_shard_range:"},{"line_number":1054,"context_line":"                # Update the acceptor container with its expanding state to"},{"line_number":1055,"context_line":"                # prevent it treating object updates redirected from the donor"},{"line_number":1056,"context_line":"                # as misplaced."},{"line_number":1057,"context_line":"                self._update_shard_ranges("},{"line_number":1058,"context_line":"                    acceptor.account, acceptor.container, [acceptor])"},{"line_number":1059,"context_line":"                # Make a copy the acceptor shard range to send to the donor"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_5cfd24af","line":1056,"in_reply_to":"df7087c5_b95d80ea","updated":"2018-03-13 09:37:39.000000000","message":"Good question... The container server accepts object updates unless it has a shard range in its db to which the object could be redirected. So the comment here is misleading.\n\nI should the particular shard range *states* to which redirects are sent","commit_id":"2cc05e141fa15d18e50f0d3f6623770ce164adb7"}]}
