)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f07c462294080b9ec3ac1d2b37ba833f33f52d3f","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The current CellDatabases fixture uses a single lock to protect code"},{"line_number":10,"context_line":"that needs to run with the global database state pointed at a specific"},{"line_number":11,"context_line":"cell. That is a problem if we ever need to recursively target a cell"},{"line_number":12,"context_line":"(which would work in real life but not in tests), as wells as if we have"},{"line_number":13,"context_line":"two threads that need to target a cell where other locks are involved"},{"line_number":14,"context_line":"such that they deadlock each other."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3f79a3b5_73de056c","line":12,"range":{"start_line":12,"start_character":53,"end_line":12,"end_character":58},"updated":"2018-10-24 14:38:35.000000000","message":"as well as when we have?","commit_id":"e07dac97905013cb86da7f8f531b2e433cee3768"}],"nova/tests/fixtures.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9130b3233829e1011ff0ff040c92b7c513786df","unresolved":false,"context_lines":[{"line_number":483,"context_line":"                ctxt_mgr \u003d self._ctxt_mgrs[cell_mapping.database_connection]"},{"line_number":484,"context_line":"                # This assumes the next local DB access is the same cell that"},{"line_number":485,"context_line":"                # was targeted last time."},{"line_number":486,"context_line":"                self._last_ctxt_mgr \u003d ctxt_mgr"},{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        with self._cell_lock.read_lock():"},{"line_number":489,"context_line":"            if self._last_ctxt_mgr !\u003d desired:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_7863b246","line":486,"updated":"2018-10-18 16:44:56.000000000","message":"This can used desired and remove L483","commit_id":"e2fe814b5ea5ef345ba132613e64c1052701d843"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d9130b3233829e1011ff0ff040c92b7c513786df","unresolved":false,"context_lines":[{"line_number":487,"context_line":""},{"line_number":488,"context_line":"        with self._cell_lock.read_lock():"},{"line_number":489,"context_line":"            if self._last_ctxt_mgr !\u003d desired:"},{"line_number":490,"context_line":"                raise RuntimeError(\u0027Global DB state changed underneath us\u0027)"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":"            try:"},{"line_number":493,"context_line":"                with self._real_target_cell(context, cell_mapping) as ccontext:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_b8814ac5","line":490,"updated":"2018-10-18 16:44:56.000000000","message":"I meant to add a comment here. Technically we could block on the read_lock, and the state could be changed from what we just did. So we need this assertion here to make sure. In this case we should retry, but I haven\u0027t seen this happen yet so I\u0027m leaving it less complicated and propose we do that until we find a place where we actually hit this race. Since it\u0027s just tests, I think this assertion is enough.","commit_id":"e2fe814b5ea5ef345ba132613e64c1052701d843"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f07c462294080b9ec3ac1d2b37ba833f33f52d3f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        # state in a safe way such that code that doesn\u0027t know anything about"},{"line_number":440,"context_line":"        # cell targeting (i.e. compute node code) can continue to operate when"},{"line_number":441,"context_line":"        # called from something that has targeted a specific cell. In order to"},{"line_number":442,"context_line":"        # make this safe from a dining-philospher-style deadlock, we need to be"},{"line_number":443,"context_line":"        # able to support multiple threads talking to the same cell at the same"},{"line_number":444,"context_line":"        # time and potentially recursion within the same thread from code that"},{"line_number":445,"context_line":"        # would otherwise be running on separate nodes in real life, but where"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_b346dd21","line":442,"range":{"start_line":442,"start_character":39,"end_line":442,"end_character":49},"updated":"2018-10-24 14:38:35.000000000","message":"philosopher","commit_id":"e07dac97905013cb86da7f8f531b2e433cee3768"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f07c462294080b9ec3ac1d2b37ba833f33f52d3f","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        # able to support multiple threads talking to the same cell at the same"},{"line_number":444,"context_line":"        # time and potentially recursion within the same thread from code that"},{"line_number":445,"context_line":"        # would otherwise be running on separate nodes in real life, but where"},{"line_number":446,"context_line":"        # we\u0027re actually recursing in te tests."},{"line_number":447,"context_line":"        #"},{"line_number":448,"context_line":"        # The basic logic here is:"},{"line_number":449,"context_line":"        #  1. Grab a reader lock to see if the state is already pointing at"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f79a3b5_93496130","line":446,"range":{"start_line":446,"start_character":38,"end_line":446,"end_character":40},"updated":"2018-10-24 14:38:35.000000000","message":"the","commit_id":"e07dac97905013cb86da7f8f531b2e433cee3768"}]}
