)]}'
{"swift/container/server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6fc6d4fc27ae954c41803ee3746f30e9a8fdf63b","unresolved":false,"context_lines":[{"line_number":313,"context_line":"            record_type \u003d req.headers.get(\u0027x-backend-record-type\u0027)"},{"line_number":314,"context_line":"            if record_type \u003d\u003d str(RECORD_TYPE_PIVOT_NODE):"},{"line_number":315,"context_line":"                broker.delete_pivot("},{"line_number":316,"context_line":"                    # TODO (acoles): should this be x-timestamp?"},{"line_number":317,"context_line":"                    obj, req.headers.get(\u0027x-backend-timestamp\u0027),"},{"line_number":318,"context_line":"                    req.headers.get("},{"line_number":319,"context_line":"                        \u0027x-meta-timestamp\u0027, req_timestamp.internal),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_afc3e388","line":316,"updated":"2017-09-07 04:38:09.000000000","message":"hmm, yes. For a PUT pivot, we might just be updating the stats, so we need to be able to pass the timestamp, thus backend-timestamp. But because this is to delete a pivot not update it. The X-Timestamp would be correct.","commit_id":"70fcaa57f4283588fae1c73e88b3a363411bab8e"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6fc6d4fc27ae954c41803ee3746f30e9a8fdf63b","unresolved":false,"context_lines":[{"line_number":435,"context_line":"                if res:"},{"line_number":436,"context_line":"                    return res"},{"line_number":437,"context_line":"                # TODO: else what? should not return HTTPCreated when the"},{"line_number":438,"context_line":"                # update was ignored"},{"line_number":439,"context_line":"            else:"},{"line_number":440,"context_line":"                broker.put_object(obj, req_timestamp.internal,"},{"line_number":441,"context_line":"                                  int(req.headers[\u0027x-size\u0027]),"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_af1f6306","line":438,"updated":"2017-09-07 04:38:09.000000000","message":"hmm, the _find_shard_location seems to return either a HTTPMovedPermanently, HTTPInternalServerError or None. The none case seems to be if it can\u0027t find a range for the object meaning the HTTPCreated is returned on line 447 and so the update will come to the this container to be redirected via sharding or misplaced objects later.\n\nMaybe the cleaner way would be to return a HTTPCreated instead of None and:\n\n  return self._find_shard_location(req, broker, obj)","commit_id":"70fcaa57f4283588fae1c73e88b3a363411bab8e"}],"swift/container/sharder.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6fc6d4fc27ae954c41803ee3746f30e9a8fdf63b","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        for item in items:"},{"line_number":273,"context_line":"            try:"},{"line_number":274,"context_line":"                if isinstance(item, PivotRange):"},{"line_number":275,"context_line":"                    item \u003d ("},{"line_number":276,"context_line":"                        item.name, item.timestamp.internal, item.lower,"},{"line_number":277,"context_line":"                        item.upper, item.object_count, item.bytes_used,"},{"line_number":278,"context_line":"                        item.meta_timestamp.internal)"},{"line_number":279,"context_line":"                ts_str \u003d item[1]"},{"line_number":280,"context_line":"                if delete:"},{"line_number":281,"context_line":"                    # Generate a new delete timestamp based off the existing"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_6fea9bd8","line":278,"range":{"start_line":275,"start_character":21,"end_line":278,"end_character":53},"updated":"2017-09-07 04:38:09.000000000","message":"we could:\n\n  item \u003d [element[-1] for element in item]","commit_id":"70fcaa57f4283588fae1c73e88b3a363411bab8e"}],"test/unit/container/test_server.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"6fc6d4fc27ae954c41803ee3746f30e9a8fdf63b","unresolved":false,"context_lines":[{"line_number":91,"context_line":"    def _put_pivot_range(self, pivot_range):"},{"line_number":92,"context_line":"        headers \u003d {"},{"line_number":93,"context_line":"            \u0027x-timestamp\u0027: pivot_range.timestamp.normal,"},{"line_number":94,"context_line":"            \u0027x-backend-record-type\u0027: 1,"},{"line_number":95,"context_line":"            \u0027x-backend-pivot-objects\u0027: pivot_range.object_count,"},{"line_number":96,"context_line":"            \u0027x-backend-pivot-bytes\u0027: pivot_range.bytes_used,"},{"line_number":97,"context_line":"            \u0027x-backend-pivot-lower\u0027: pivot_range.lower,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f287b81_afcd2386","line":94,"range":{"start_line":94,"start_character":37,"end_line":94,"end_character":38},"updated":"2017-09-07 04:38:09.000000000","message":"We could use the constant here.\n\n  from swift.container.backend import RECORD_TYPE_PIVOT_NODE","commit_id":"70fcaa57f4283588fae1c73e88b3a363411bab8e"}]}
