)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2daaecae0a245883a60427948b0949e65f9e7f83","unresolved":false,"context_lines":[{"line_number":10,"context_line":"was merged just after 3a850ac72d60b3823c5cb4a971eaf02c580a4a20 to fix"},{"line_number":11,"context_line":"same issue but in a different way which was not optimal. Issue is a"},{"line_number":12,"context_line":"race which can happen during boot time, it\u0027s not necessary to remove"},{"line_number":13,"context_line":"benefice a cache by refreshing each time from database network"},{"line_number":14,"context_line":"info where we can just ask Neutron when this race happen."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We do not have a way to fix this race, it happens during boot process"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_3df90781","line":13,"updated":"2016-01-08 14:40:46.000000000","message":"My current understanding is that this cache (which is stored in Nova DB) was introduced to avoid excessive calls to Neutron API. I.e. we don\u0027t really have this cache locally in the context of nova-compute process anyway.","commit_id":"333dd1475d19be79fbbd17d5c847a56ebcea02b7"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2daaecae0a245883a60427948b0949e65f9e7f83","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We do not have a way to fix this race, it happens during boot process"},{"line_number":17,"context_line":"when event from neutron to populate database of networks is arriving"},{"line_number":18,"context_line":"after we get network_info, so if network_info is empty when build"},{"line_number":19,"context_line":"networks we ask Neutron to get fresh information about networks."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Closes-bug: #1501735"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa69d971_dda46bba","line":18,"updated":"2016-01-08 14:40:46.000000000","message":"Why emptiness of network_info should be a special case here? We can get these events from Neutron after when interfaces / floating IPs are added / removed, etc.\n\nIMO, https://review.openstack.org/#/c/230919/ addresses this better by making sure we always read the latest state of nw_info before updating it (and read + update happen with a lock held).","commit_id":"333dd1475d19be79fbbd17d5c847a56ebcea02b7"}],"nova/network/base_api.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"2daaecae0a245883a60427948b0949e65f9e7f83","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    @functools.wraps(f)"},{"line_number":64,"context_line":"    def wrapper(self, context, *args, **kwargs):"},{"line_number":65,"context_line":"        res \u003d f(self, context, *args, **kwargs)"},{"line_number":66,"context_line":"        try:"},{"line_number":67,"context_line":"            # get the instance from arguments (or raise ValueError)"},{"line_number":68,"context_line":"            instance \u003d kwargs.get(\u0027instance\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa69d971_b1e9a61c","line":65,"updated":"2016-01-08 14:40:46.000000000","message":"AFAIU, we read and potentially changed the nw_info value here and going to use it to at #76-77. In case more than one thread executes refresh_cache() concurrently, the last one to write the value will win.\n\nMy current understanding is that it\u0027s essential for res to be calculated with the lock held, otherwise we\u0027ll run into LP #1467581","commit_id":"333dd1475d19be79fbbd17d5c847a56ebcea02b7"}]}
