)]}'
{"swift/container/server.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"            if record_type \u003d\u003d str(RECORD_TYPE_SHARD_NODE):"},{"line_number":420,"context_line":"                broker.update_shard_range("},{"line_number":421,"context_line":"                    shard_range_from_headers(obj, req.headers))"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"            else:"},{"line_number":424,"context_line":"                # redirect if a shard exists for this object name"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_10e1e3d0","line":421,"updated":"2018-01-29 18:52:31.000000000","message":"Will we end up getting rid of this path at some point?","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":418,"context_line":""},{"line_number":419,"context_line":"            if record_type \u003d\u003d str(RECORD_TYPE_SHARD_NODE):"},{"line_number":420,"context_line":"                broker.update_shard_range("},{"line_number":421,"context_line":"                    shard_range_from_headers(obj, req.headers))"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"            else:"},{"line_number":424,"context_line":"                # redirect if a shard exists for this object name"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_cea646ac","line":421,"in_reply_to":"5f93b717_10e1e3d0","updated":"2018-01-31 11:08:49.000000000","message":"yes it\u0027s on trello backlog\n\nhttps://trello.com/c/3HzqbCtF/147-remove-support-for-put-single-shard-range-to-container-server","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            return HTTPCreated(request\u003dreq)"},{"line_number":437,"context_line":"        elif record_type \u003d\u003d str(RECORD_TYPE_SHARD_NODE):"},{"line_number":438,"context_line":"            try:"},{"line_number":439,"context_line":"                shard_ranges \u003d json.loads(req.body)"},{"line_number":440,"context_line":"            except ValueError as err:"},{"line_number":441,"context_line":"                return HTTPBadRequest(\u0027Invalid body: %s\u0027 % err)"},{"line_number":442,"context_line":"            # TODO: consider writing the shard ranges into the pending file,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_703f0725","line":439,"updated":"2018-01-29 18:52:31.000000000","message":"I\u0027m always a little wary of passing a request body straight into json.loads, but since it\u0027s protected by an X-Backend-* header, it\u0027s probably fine.\n\nDo we know roughly how large we expect these bodies to get?","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":436,"context_line":"            return HTTPCreated(request\u003dreq)"},{"line_number":437,"context_line":"        elif record_type \u003d\u003d str(RECORD_TYPE_SHARD_NODE):"},{"line_number":438,"context_line":"            try:"},{"line_number":439,"context_line":"                shard_ranges \u003d json.loads(req.body)"},{"line_number":440,"context_line":"            except ValueError as err:"},{"line_number":441,"context_line":"                return HTTPBadRequest(\u0027Invalid body: %s\u0027 % err)"},{"line_number":442,"context_line":"            # TODO: consider writing the shard ranges into the pending file,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_eecc626b","line":439,"in_reply_to":"5f93b717_703f0725","updated":"2018-01-31 11:08:49.000000000","message":"Ideally no more than 2 or 3 shard ranges, but if a shard has grown very large without sharding could be larger","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            # TODO: consider writing the shard ranges into the pending file,"},{"line_number":443,"context_line":"            # but if so ensure an all-or-none semantic for the write"},{"line_number":444,"context_line":"            broker.merge_shard_ranges(shard_ranges)"},{"line_number":445,"context_line":"            return HTTPCreated(request\u003dreq)"},{"line_number":446,"context_line":"        else:   # put container"},{"line_number":447,"context_line":"            if requested_policy_index is None:"},{"line_number":448,"context_line":"                # use the default index sent by the proxy if available"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_107d63e6","line":445,"range":{"start_line":445,"start_character":19,"end_line":445,"end_character":30},"updated":"2018-01-29 18:52:31.000000000","message":"nit: I wonder if HTTPAccepted would be more appropriate -- some of these may have already existed, yeah?","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":442,"context_line":"            # TODO: consider writing the shard ranges into the pending file,"},{"line_number":443,"context_line":"            # but if so ensure an all-or-none semantic for the write"},{"line_number":444,"context_line":"            broker.merge_shard_ranges(shard_ranges)"},{"line_number":445,"context_line":"            return HTTPCreated(request\u003dreq)"},{"line_number":446,"context_line":"        else:   # put container"},{"line_number":447,"context_line":"            if requested_policy_index is None:"},{"line_number":448,"context_line":"                # use the default index sent by the proxy if available"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_6e905244","line":445,"range":{"start_line":445,"start_character":19,"end_line":445,"end_character":30},"in_reply_to":"5f93b717_107d63e6","updated":"2018-01-31 11:08:49.000000000","message":"had same thought but line 436 we retunr HTTPCreated for objects regardless of whether they already exist or not, so I went for consistency","commit_id":"e93728199255ae625579458d72970224499bfb59"}],"swift/container/sharder.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":688,"context_line":"            obj_path \u003d \u0027%s/%s\u0027 % (path, obj)"},{"line_number":689,"context_line":"            self.logger.info(\u0027sending %s update for shard range %s to %s\u0027 %"},{"line_number":690,"context_line":"                             (op, shard_range, obj_path))"},{"line_number":691,"context_line":"            headers \u003d shard_range_to_headers(shard_range)"},{"line_number":692,"context_line":"            headers[\u0027x-backend-record-type\u0027] \u003d RECORD_TYPE_SHARD_NODE"},{"line_number":693,"context_line":"            headers[\u0027x-size\u0027] \u003d 0"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_f031d70c","side":"PARENT","line":691,"range":{"start_line":691,"start_character":22,"end_line":691,"end_character":44},"updated":"2018-01-29 18:52:31.000000000","message":"Will we be able to get rid of this, then?","commit_id":"1125951930749431c5cf87f02155ab042513d20b"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":688,"context_line":"            obj_path \u003d \u0027%s/%s\u0027 % (path, obj)"},{"line_number":689,"context_line":"            self.logger.info(\u0027sending %s update for shard range %s to %s\u0027 %"},{"line_number":690,"context_line":"                             (op, shard_range, obj_path))"},{"line_number":691,"context_line":"            headers \u003d shard_range_to_headers(shard_range)"},{"line_number":692,"context_line":"            headers[\u0027x-backend-record-type\u0027] \u003d RECORD_TYPE_SHARD_NODE"},{"line_number":693,"context_line":"            headers[\u0027x-size\u0027] \u003d 0"},{"line_number":694,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_ce1ba6c7","side":"PARENT","line":691,"range":{"start_line":691,"start_character":22,"end_line":691,"end_character":44},"in_reply_to":"5f93b717_f031d70c","updated":"2018-01-31 11:08:49.000000000","message":"yes, in backlog\n\nI refrained from the work of deleting the older path in case this approach didn\u0027t fly","commit_id":"1125951930749431c5cf87f02155ab042513d20b"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                # now delete the older overlaps, keeping only the newest"},{"line_number":409,"context_line":"                timestamp \u003d Timestamp(newest.timestamp, offset\u003d1)"},{"line_number":410,"context_line":"                for range in older:"},{"line_number":411,"context_line":"                    range.timestamp \u003d timestamp"},{"line_number":412,"context_line":"                self._update_shard_ranges("},{"line_number":413,"context_line":"                    broker.root_account, broker.root_container, older)"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_b0d10fd0","line":410,"range":{"start_line":410,"start_character":20,"end_line":410,"end_character":25},"updated":"2018-01-29 18:52:31.000000000","message":"Off-topic: we should probably stop shadowing the built-in range.","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                for range in older:"},{"line_number":411,"context_line":"                    range.timestamp \u003d timestamp"},{"line_number":412,"context_line":"                self._update_shard_ranges("},{"line_number":413,"context_line":"                    broker.root_account, broker.root_container, older)"},{"line_number":414,"context_line":"                continue_with_container \u003d False"},{"line_number":415,"context_line":"            missing_ranges \u003d ContainerSharder.check_complete_ranges(ranges)"},{"line_number":416,"context_line":"            if missing_ranges:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_50e0cb96","line":413,"range":{"start_line":413,"start_character":64,"end_line":413,"end_character":69},"updated":"2018-01-29 18:52:31.000000000","message":"How/where do we end up marking these as deleted?","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                for range in older:"},{"line_number":411,"context_line":"                    range.timestamp \u003d timestamp"},{"line_number":412,"context_line":"                self._update_shard_ranges("},{"line_number":413,"context_line":"                    broker.root_account, broker.root_container, older)"},{"line_number":414,"context_line":"                continue_with_container \u003d False"},{"line_number":415,"context_line":"            missing_ranges \u003d ContainerSharder.check_complete_ranges(ranges)"},{"line_number":416,"context_line":"            if missing_ranges:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_ceede6b7","line":413,"range":{"start_line":413,"start_character":64,"end_line":413,"end_character":69},"in_reply_to":"5f93b717_50e0cb96","updated":"2018-01-31 11:08:49.000000000","message":"hmmm, that\u0027s a bug, good catch\n\nfixed https://review.openstack.org/539492","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"2a295cc0e818ed527b19cf0095829fccc81cd15a","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"            left \u003d len(body)"},{"line_number":656,"context_line":"            contents_f \u003d FileLikeIter(body)"},{"line_number":657,"context_line":"            chunk_size \u003d 65536"},{"line_number":658,"context_line":"            while left \u003e 0:"},{"line_number":659,"context_line":"                size \u003d chunk_size"},{"line_number":660,"context_line":"                if size \u003e left:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_d0493b8b","line":657,"updated":"2018-01-29 18:52:31.000000000","message":"I wonder whether this chunking is really necessary... We\u0027ve got it all loaded in memory, anyway, yeah? Couldn\u0027t we just set Content-Length in headers_out and do\n\n conn.send(body)\n\n?","commit_id":"e93728199255ae625579458d72970224499bfb59"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"e8d49df2905d424441ef2eee286a6573ad2a3970","unresolved":false,"context_lines":[{"line_number":654,"context_line":""},{"line_number":655,"context_line":"            left \u003d len(body)"},{"line_number":656,"context_line":"            contents_f \u003d FileLikeIter(body)"},{"line_number":657,"context_line":"            chunk_size \u003d 65536"},{"line_number":658,"context_line":"            while left \u003e 0:"},{"line_number":659,"context_line":"                size \u003d chunk_size"},{"line_number":660,"context_line":"                if size \u003e left:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5f93b717_2e800abf","line":657,"in_reply_to":"5f93b717_d0493b8b","updated":"2018-01-31 11:08:49.000000000","message":"+1","commit_id":"e93728199255ae625579458d72970224499bfb59"}]}
