)]}'
{"neutron/plugins/bigswitch/servermanager.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5251c05bedec44c7c9ec2df11f855ec403697769","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # this context needs to be local to the greenthread"},{"line_number":270,"context_line":"        # so concurrent requests don\u0027t use the wrong context."},{"line_number":271,"context_line":"        # Use a weakref so the context is garbage collected"},{"line_number":272,"context_line":"        # after the plugin is done with it."},{"line_number":273,"context_line":"        ref \u003d weakref.ref(context)"},{"line_number":274,"context_line":"        self.contexts[eventlet.corolocal.get_ident()] \u003d ref"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_cf3cba96","line":272,"updated":"2014-07-01 14:00:49.000000000","message":"isn\u0027t it simpler to clean up in the decorator?","commit_id":"220924598b07664449ea47bdbb61a33ae582fc6b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"353518a9cddf4e7a8cc1d389cea995ad0b74633a","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # this context needs to be local to the greenthread"},{"line_number":270,"context_line":"        # so concurrent requests don\u0027t use the wrong context."},{"line_number":271,"context_line":"        # Use a weakref so the context is garbage collected"},{"line_number":272,"context_line":"        # after the plugin is done with it."},{"line_number":273,"context_line":"        ref \u003d weakref.ref(context)"},{"line_number":274,"context_line":"        self.contexts[eventlet.corolocal.get_ident()] \u003d ref"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_86b0e88c","line":272,"in_reply_to":"baada198_60fc9b3f","updated":"2014-07-01 15:33:18.000000000","message":"They both reference the same location to store the context. \n\nadd_router_interface has the wrapper. Inside it calls create_port which has the wrapper as well. create_port will make it\u0027s rest call and then upon exiting the function, create_port\u0027s wrapper will delete the context. Then when add_router_interface gets to its rest call, the context is gone.","commit_id":"220924598b07664449ea47bdbb61a33ae582fc6b"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"c133713673bc3eb35696b5df74a223f347bff893","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # this context needs to be local to the greenthread"},{"line_number":270,"context_line":"        # so concurrent requests don\u0027t use the wrong context."},{"line_number":271,"context_line":"        # Use a weakref so the context is garbage collected"},{"line_number":272,"context_line":"        # after the plugin is done with it."},{"line_number":273,"context_line":"        ref \u003d weakref.ref(context)"},{"line_number":274,"context_line":"        self.contexts[eventlet.corolocal.get_ident()] \u003d ref"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_ea832cca","line":272,"in_reply_to":"baada198_cf3cba96","updated":"2014-07-01 14:27:58.000000000","message":"No, some processes like floating IPs or router interfaces resort in multiple rest calls. If one of the calls like \"create_port\" clears the context out before the other rest call (e.g. \"rest_add_router_interface\" in this case), the server manager won\u0027t have the context for the second call.","commit_id":"220924598b07664449ea47bdbb61a33ae582fc6b"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"85ddbe356060814e9b6bb5ee9eae4fb8869d94e0","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        # this context needs to be local to the greenthread"},{"line_number":270,"context_line":"        # so concurrent requests don\u0027t use the wrong context."},{"line_number":271,"context_line":"        # Use a weakref so the context is garbage collected"},{"line_number":272,"context_line":"        # after the plugin is done with it."},{"line_number":273,"context_line":"        ref \u003d weakref.ref(context)"},{"line_number":274,"context_line":"        self.contexts[eventlet.corolocal.get_ident()] \u003d ref"},{"line_number":275,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_60fc9b3f","line":272,"in_reply_to":"baada198_ea832cca","updated":"2014-07-01 15:11:44.000000000","message":"sorry i don\u0027t understand.\ni meant to clean up the context in put_context_in_serverpool wrapper\nafter finishing calling the wrapped function.\nmultiple uses of the context in the wrapped function should not be a problem.","commit_id":"220924598b07664449ea47bdbb61a33ae582fc6b"}]}
