)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"054f0b365cfcb7eb7b12152352d9a4353ebd61c8","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Handle local \u0026 remote exceptions consistently."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Related to LP 1021373."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Previously the handling of RemoteErrors (thrown via RPC) in the native API"},{"line_number":12,"context_line":"was inconsistent with exceptions raised locally within the API service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAKX%2F%2F5fE%3D","line":10,"updated":"2012-07-18 08:44:35.000000000","message":"Hmm, some further explanation of how it relates to #1021373 is warranted\n\ne.g. which quotas aren\u0027t being enforced on the API side resulting in RemoteErrors being returned to the user? It looks to me like it\u0027s floating IPs only?","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a7a12bd29b9ccd7cfd8b4c13a1f3f2aa1cff754e","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Handle local \u0026 remote exceptions consistently."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Related to LP 1021373."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Previously the handling of RemoteErrors (thrown via RPC) in the native API"},{"line_number":12,"context_line":"was inconsistent with exceptions raised locally within the API service."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"AAAAKX%2F%2F5eA%3D","line":10,"in_reply_to":"AAAAKX%2F%2F5fE%3D","updated":"2012-07-18 09:57:56.000000000","message":"Good point, commit message extended.\n\nAnd yes, I think floating_ips is the only existing quota where the enforcement point lies outside the API service.","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"}],"nova/api/openstack/__init__.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"054f0b365cfcb7eb7b12152352d9a4353ebd61c8","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def __init__(self, application):"},{"line_number":42,"context_line":"        self.name_to_type \u003d {}"},{"line_number":43,"context_line":"        for clazz in utils.walk_class_hierarchy(exception.NovaException):"},{"line_number":44,"context_line":"            self.name_to_type[clazz.__name__] \u003d clazz"},{"line_number":45,"context_line":"        self.status_to_type \u003d {}"},{"line_number":46,"context_line":"        for clazz in utils.walk_class_hierarchy(webob.exc.HTTPError):"},{"line_number":47,"context_line":"            self.status_to_type[clazz.code] \u003d clazz"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAKX%2F%2F5fA%3D","line":44,"updated":"2012-07-18 08:44:35.000000000","message":"How often is a PasteDeploy pipeline created?\n\nif it\u0027s created per request, then we\u0027re creating a 200 element mapping for each request specifically for error handling and then throwing it away\n\nI\u0027d have been happier to see the status_to_type mapping in the original patch be populated at module load time but, even if you do that on master, it\u0027s not worth backporting\n\nSuggestion below on how to avoid creating the name_to_type mapping at all","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a7a12bd29b9ccd7cfd8b4c13a1f3f2aa1cff754e","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    def __init__(self, application):"},{"line_number":42,"context_line":"        self.name_to_type \u003d {}"},{"line_number":43,"context_line":"        for clazz in utils.walk_class_hierarchy(exception.NovaException):"},{"line_number":44,"context_line":"            self.name_to_type[clazz.__name__] \u003d clazz"},{"line_number":45,"context_line":"        self.status_to_type \u003d {}"},{"line_number":46,"context_line":"        for clazz in utils.walk_class_hierarchy(webob.exc.HTTPError):"},{"line_number":47,"context_line":"            self.status_to_type[clazz.code] \u003d clazz"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAKX%2F%2F5eQ%3D","line":44,"in_reply_to":"AAAAKX%2F%2F5fA%3D","updated":"2012-07-18 09:57:56.000000000","message":"Good question ... the FaultWrapper class would be instantiated once-per-pipeline, as configured in the api-paste.ini.\n\nSo in this case, we\u0027d be talking about circa half-a-dozen instances of the dict (as the native faultwrap features in that number of pipelines out-of-the-box).","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"054f0b365cfcb7eb7b12152352d9a4353ebd61c8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def __call__(self, req):"},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            return req.get_response(self.application)"},{"line_number":74,"context_line":"        except rpc_common.RemoteError as e:"},{"line_number":75,"context_line":"            remote_exception_type \u003d self.name_to_type.get(e.exc_type)"},{"line_number":76,"context_line":"            if remote_exception_type:"},{"line_number":77,"context_line":"                headers \u003d remote_exception_type.headers"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAKX%2F%2F5e4%3D","line":74,"updated":"2012-07-18 08:44:35.000000000","message":"Since this is a pretty exceptional case, I\u0027d be happy for us to just add this here:\n\n def get_type_from_name(name):\n     for c in utils.walk_class_hierarchy(exception.NovaException):\n         if c.__name__ \u003d\u003d name:\n             return c","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"24291cd59b0ca95218faad68dd057380ca1f2ba8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def __call__(self, req):"},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            return req.get_response(self.application)"},{"line_number":74,"context_line":"        except rpc_common.RemoteError as e:"},{"line_number":75,"context_line":"            remote_exception_type \u003d self.name_to_type.get(e.exc_type)"},{"line_number":76,"context_line":"            if remote_exception_type:"},{"line_number":77,"context_line":"                headers \u003d remote_exception_type.headers"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAKX%2F%2F5cg%3D","line":74,"in_reply_to":"AAAAKX%2F%2F5d8%3D","updated":"2012-07-18 11:29:31.000000000","message":"There\u0027s two things to weigh up here - the right thing in general and the risk of regression in essex\n\nWith the map, I see the potential for a large increase in memory usage at all times (depending on how many of these objects are created and I\u0027m not confident we know e.g. whether pipelines are recreated often) for an error handling fix\n\nDoing it the way I suggest, it\u0027s a fairly tiny CPU usage hit on the error handling path and the code is more self-contained\n\nIf this was a review for the master branch, I might suggest maps as globals (since they\u0027re read-only) in the nova.exception module e.g.\n\n  remote_exception_type \u003d exception.NAME_TO_NOVA_TYPE.get(e.exc_type)\n\nbut what we\u0027re going for here is minimal impact","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"a7a12bd29b9ccd7cfd8b4c13a1f3f2aa1cff754e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    def __call__(self, req):"},{"line_number":72,"context_line":"        try:"},{"line_number":73,"context_line":"            return req.get_response(self.application)"},{"line_number":74,"context_line":"        except rpc_common.RemoteError as e:"},{"line_number":75,"context_line":"            remote_exception_type \u003d self.name_to_type.get(e.exc_type)"},{"line_number":76,"context_line":"            if remote_exception_type:"},{"line_number":77,"context_line":"                headers \u003d remote_exception_type.headers"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAKX%2F%2F5d8%3D","line":74,"in_reply_to":"AAAAKX%2F%2F5e4%3D","updated":"2012-07-18 09:57:56.000000000","message":"Would this be justified, given that the fairly limited number of times the map is instantiated up-front?\n\ni.e. for a long-running nova-api service, I\u0027d guess we\u0027re likely to see more RemoteErrors being raised than there are pipelines configured to include faultwrap.","commit_id":"9b3e0b6d43a1c922d986478a6f8c09b04eb58de5"}]}
