)]}'
{"octavia/controller/worker/flows/load_balancer_flows.py":[{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"8d871f21a49d461f270d2a0b3aa4823756dc5e11","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        return allocate_amphorae_flow, lb_create_graph_flow"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def get_post_lb_amp_association_flow(self, prefix, topology,"},{"line_number":147,"context_line":"                                         mark_active\u003dTrue):"},{"line_number":148,"context_line":"        \"\"\"Reload the loadbalancer and create networking subflows for"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        created/allocated amphorae."}],"source_content_type":"text/x-python","patch_set":25,"id":"9aed3d3a_0b4b57b1","line":147,"range":{"start_line":147,"start_character":41,"end_line":147,"end_character":57},"updated":"2016-02-28 00:28:07.000000000","message":"This is not used, remove if not needed.","commit_id":"de88899680fff165c6fffd8a3f46c4421137bd19"}],"octavia/controller/worker/tasks/amphora_driver_tasks.py":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cf9c1fd5bd908baa762283b2e918dc31ef426ba5","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_c9fb25c0","line":62,"updated":"2016-02-29 05:45:08.000000000","message":"This only updates the listeners until an exception is thrown. So please add code to catch the exception and update the other listeners (just in case only that row was broken)","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10806,"name":"Trevor Vardeman","email":"tvardema@redhat.com","username":"tvardeman"},"change_message_id":"8e9981e2f290b73650fe9d232da91fd94a672e7c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_8e18e71f","line":62,"in_reply_to":"9aed3d3a_04197422","updated":"2016-02-29 15:14:57.000000000","message":"I tend to agree with Balukoff here, but I can add a try-catch around the update attempt to let it log failures and try the next, or we can have that as a requested bug fix and I can do it in the next few days in its own review, that\u0027s up to you guys that have +2 power :D.  I just can\u0027t personally come up with an error situation where one listener\u0027s prov status is having an issue being updated but the rest will work just fine, especially when all being committed in the same session (hence us passing it around).","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"c74dca53e2d173246a48327cd6fd7bffc5ee68fe","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_bae361d8","line":62,"in_reply_to":"9aed3d3a_8e18e71f","updated":"2016-02-29 16:14:50.000000000","message":"I agree what I describe is an edge case but it\u0027s like three lines of codes so I think it\u0027s worth it. I have also seen in my career intermittent DB connection errors so they do exist :-)","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f3bc3cc2cd349c00531cefea0836d34abfe338a6","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_74abad75","line":62,"in_reply_to":"9aed3d3a_bae361d8","updated":"2016-02-29 16:53:28.000000000","message":"Since we are getting a session for each listener, there could be value in catching exceptions here.  Most importantly so that the revert continues and doesn\u0027t fail out.\nThat said, I would like to see an enhancement where we just make a single repo call that does the database updates inside one call (this can be done later via a bug).","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"e95246e243b6e24a35bd8015e08f18b2e755144c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_04197422","line":62,"in_reply_to":"9aed3d3a_c9fb25c0","updated":"2016-02-29 06:44:33.000000000","message":"I\u0027m not sure I agree, German: If a revert is necessary, it is very likely to happen on the first listener (unless we\u0027re generating faulty configs, which isn\u0027t really a run-time error per se). By this point in the process all the listeners are in the database (meaning previous database updates worked correctly), and all the revert does is mark the listeners in this transaction in a failed state.\n\nIn other words, we\u0027re very unlikely to run into a situation where writing all the listeners to the database worked, pushing the haproxy config on one of them failed, and then doing another update to the database fails. And even if that were to happen, the most likely cause of this is that the connection to the database failed or the database is otherwise down-- in which case retrying the rest of them in the list is also useless.\n\nIn other words, I think you\u0027re picking out something here that is so unlikely to be a problem that it\u0027s going to be wasted effort to \"fix\" it.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"f9e1e4f09c78b032ce97a89b5daf87ad97a3687c","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":28,"id":"9aed3d3a_0d8854c4","line":62,"range":{"start_line":62,"start_character":8,"end_line":62,"end_character":11},"updated":"2016-02-29 17:30:51.000000000","message":"you also need to wrap this code in an exception --","commit_id":"1a5ef704aca16d381df9092228dbe9574249890a"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"4a26a0fc8ee5ae0717414488ed42528163f6d94f","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        \"\"\"Handle failed listeners updates.\"\"\""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        LOG.warn(_LW(\"Reverting listeners updates.\"))"},{"line_number":62,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":63,"context_line":"            self.listener_repo.update(db_apis.get_session(), id\u003dlistener.id,"},{"line_number":64,"context_line":"                                      provisioning_status\u003dconstants.ERROR)"},{"line_number":65,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":29,"id":"9aed3d3a_b7c36a56","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":20},"updated":"2016-02-29 20:32:32.000000000","message":"I had this loop in mind... but it doesn\u0027t hurt on the one below as well...","commit_id":"1e3b57aa526336d5703344c59ee9b466b4784aef"}],"octavia/controller/worker/tasks/database_tasks.py":[{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cf9c1fd5bd908baa762283b2e918dc31ef426ba5","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if self.mark_listeners:"},{"line_number":682,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ACTIVE\","},{"line_number":683,"context_line":"                      loadbalancer.id)"},{"line_number":684,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":685,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":686,"context_line":"                                          listener.id,"},{"line_number":687,"context_line":"                                          provisioning_status\u003dconstants.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_09f06dc8","line":684,"range":{"start_line":684,"start_character":15,"end_line":684,"end_character":16},"updated":"2016-02-29 05:45:08.000000000","message":"For loops in tasks pain me. There really is no better database call. Can\u0027t the normal SQL update hit multiple rows?","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"e95246e243b6e24a35bd8015e08f18b2e755144c","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if self.mark_listeners:"},{"line_number":682,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ACTIVE\","},{"line_number":683,"context_line":"                      loadbalancer.id)"},{"line_number":684,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":685,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":686,"context_line":"                                          listener.id,"},{"line_number":687,"context_line":"                                          provisioning_status\u003dconstants.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_c4978c46","line":684,"range":{"start_line":684,"start_character":15,"end_line":684,"end_character":16},"in_reply_to":"9aed3d3a_09f06dc8","updated":"2016-02-29 06:44:33.000000000","message":"Yes, except that we\u0027ve abstracted all the DB updates away using SQLAlchemy by design. I suppose it\u0027s possible to write a specific method to update several database records by hand, but then we\u0027d have to work around the SQLAlchemy framework, which seems to me more dangerous (and less portable) than a for loop here.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"c74dca53e2d173246a48327cd6fd7bffc5ee68fe","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if self.mark_listeners:"},{"line_number":682,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ACTIVE\","},{"line_number":683,"context_line":"                      loadbalancer.id)"},{"line_number":684,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":685,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":686,"context_line":"                                          listener.id,"},{"line_number":687,"context_line":"                                          provisioning_status\u003dconstants.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_da32a50f","line":684,"range":{"start_line":684,"start_character":15,"end_line":684,"end_character":16},"in_reply_to":"9aed3d3a_c4978c46","updated":"2016-02-29 16:14:50.000000000","message":"According to http://stackoverflow.com/questions/25694234/bulk-update-in-sqlalchemy-core-using-where they have some way of doing that more efficiently. I am no SQL alchemy expert but I like to see at least all those updates done in the same transaction if possible.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f3bc3cc2cd349c00531cefea0836d34abfe338a6","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if self.mark_listeners:"},{"line_number":682,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ACTIVE\","},{"line_number":683,"context_line":"                      loadbalancer.id)"},{"line_number":684,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":685,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":686,"context_line":"                                          listener.id,"},{"line_number":687,"context_line":"                                          provisioning_status\u003dconstants.ACTIVE)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_544949b6","line":684,"range":{"start_line":684,"start_character":15,"end_line":684,"end_character":16},"in_reply_to":"9aed3d3a_da32a50f","updated":"2016-02-29 16:53:28.000000000","message":"I agree with German, we really should create repo methods that do this update in the database as opposed to looping and reconnecting.  This is an optimization, so can be done later with a bug.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cf9c1fd5bd908baa762283b2e918dc31ef426ba5","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        if self.mark_listeners:"},{"line_number":699,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ERROR\","},{"line_number":700,"context_line":"                      loadbalancer.id)"},{"line_number":701,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":702,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":703,"context_line":"                                          listener.id,"},{"line_number":704,"context_line":"                                          provisioning_status\u003dconstants.ERROR)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_49bc35dc","line":701,"updated":"2016-02-29 05:45:08.000000000","message":"Please make sure it attempts that for all listener and not the first which throws an exception.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"e95246e243b6e24a35bd8015e08f18b2e755144c","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        if self.mark_listeners:"},{"line_number":699,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ERROR\","},{"line_number":700,"context_line":"                      loadbalancer.id)"},{"line_number":701,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":702,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":703,"context_line":"                                          listener.id,"},{"line_number":704,"context_line":"                                          provisioning_status\u003dconstants.ERROR)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_a47b6827","line":701,"in_reply_to":"9aed3d3a_49bc35dc","updated":"2016-02-29 06:44:33.000000000","message":"I suppose it doesn\u0027t hurt to just do each of these in a try-except block to make sure that each is attempted. But, again,  I think this is largely wasted effort.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"c74dca53e2d173246a48327cd6fd7bffc5ee68fe","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        if self.mark_listeners:"},{"line_number":699,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ERROR\","},{"line_number":700,"context_line":"                      loadbalancer.id)"},{"line_number":701,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":702,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":703,"context_line":"                                          listener.id,"},{"line_number":704,"context_line":"                                          provisioning_status\u003dconstants.ERROR)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_da19058a","line":701,"in_reply_to":"9aed3d3a_a47b6827","updated":"2016-02-29 16:14:50.000000000","message":"Edge cases happen and it\u0027s just a few lines...","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f3bc3cc2cd349c00531cefea0836d34abfe338a6","unresolved":false,"context_lines":[{"line_number":698,"context_line":"        if self.mark_listeners:"},{"line_number":699,"context_line":"            LOG.debug(\"Marking all listeners of loadbalancer %s ERROR\","},{"line_number":700,"context_line":"                      loadbalancer.id)"},{"line_number":701,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":702,"context_line":"                self.listener_repo.update(db_apis.get_session(),"},{"line_number":703,"context_line":"                                          listener.id,"},{"line_number":704,"context_line":"                                          provisioning_status\u003dconstants.ERROR)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_74fa8d44","line":701,"in_reply_to":"9aed3d3a_da19058a","updated":"2016-02-29 16:53:28.000000000","message":"Same comment as before, we should catch this, if for nothing else to allow the revert to continue.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11628,"name":"Michael Johnson","email":"johnsomor@gmail.com","username":"johnsom"},"change_message_id":"f3bc3cc2cd349c00531cefea0836d34abfe338a6","unresolved":false,"context_lines":[{"line_number":1227,"context_line":"            self._mark_amp_health_busy(amphora.id)"},{"line_number":1228,"context_line":""},{"line_number":1229,"context_line":""},{"line_number":1230,"context_line":"class AllocateAllListenerPeerPorts(BaseDatabaseTask):"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def execute(self, loadbalancer):"},{"line_number":1233,"context_line":"        for new_listener in loadbalancer.listeners:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_977ab386","line":1230,"updated":"2016-02-29 16:53:28.000000000","message":"Why do we even need this?\nStephen moved the allocation of the peer port into the listener create code in the repo.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cf9c1fd5bd908baa762283b2e918dc31ef426ba5","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"class AllocateAllListenerPeerPorts(BaseDatabaseTask):"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def execute(self, loadbalancer):"},{"line_number":1233,"context_line":"        for new_listener in loadbalancer.listeners:"},{"line_number":1234,"context_line":"            max_peer_port \u003d 0"},{"line_number":1235,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":1236,"context_line":"                if (listener.peer_port is not None and"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_09c7cd64","line":1233,"range":{"start_line":1233,"start_character":12,"end_line":1233,"end_character":24},"updated":"2016-02-29 05:45:08.000000000","message":"For loops in tasks pain me because I always think we can do that in parallel. It\u0027s probably too late to change now but I managed to roll out some loops in my cascading delete flow...","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"e95246e243b6e24a35bd8015e08f18b2e755144c","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"class AllocateAllListenerPeerPorts(BaseDatabaseTask):"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def execute(self, loadbalancer):"},{"line_number":1233,"context_line":"        for new_listener in loadbalancer.listeners:"},{"line_number":1234,"context_line":"            max_peer_port \u003d 0"},{"line_number":1235,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":1236,"context_line":"                if (listener.peer_port is not None and"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_24e478df","line":1233,"range":{"start_line":1233,"start_character":12,"end_line":1233,"end_character":24},"in_reply_to":"9aed3d3a_09c7cd64","updated":"2016-02-29 06:44:33.000000000","message":"Again, for pure DB operations, I think the danger here is pretty small; it should essentially always be the case that if one update succeeds, they all will.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"c74dca53e2d173246a48327cd6fd7bffc5ee68fe","unresolved":false,"context_lines":[{"line_number":1230,"context_line":"class AllocateAllListenerPeerPorts(BaseDatabaseTask):"},{"line_number":1231,"context_line":""},{"line_number":1232,"context_line":"    def execute(self, loadbalancer):"},{"line_number":1233,"context_line":"        for new_listener in loadbalancer.listeners:"},{"line_number":1234,"context_line":"            max_peer_port \u003d 0"},{"line_number":1235,"context_line":"            for listener in loadbalancer.listeners:"},{"line_number":1236,"context_line":"                if (listener.peer_port is not None and"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_85b9e217","line":1233,"range":{"start_line":1233,"start_character":12,"end_line":1233,"end_character":24},"in_reply_to":"9aed3d3a_24e478df","updated":"2016-02-29 16:14:50.000000000","message":"My main worry here is we don\u0027t  take advantage of the parallelism we can achieve through task flow... but now as I read that more awake it seems all we need might be some better database operation... I always get worried when I see an O(N*N) algorithm... but given that listener numbers are small so probably less of a worry.","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":10850,"name":"German Eichberger","email":"german.eichberger@gmail.com","username":"german"},"change_message_id":"cf9c1fd5bd908baa762283b2e918dc31ef426ba5","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"                                      peer_port\u003dport)"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"    def revert(self, loadbalancer, *args, **kwargs):"},{"line_number":1249,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":1250,"context_line":"            self.listener_repo.update(db_apis.get_session(), listener.id,"},{"line_number":1251,"context_line":"                                      peer_port\u003dNone)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_69b779f5","line":1249,"range":{"start_line":1249,"start_character":12,"end_line":1249,"end_character":20},"updated":"2016-02-29 05:45:08.000000000","message":"Make sure despite DB errors all listener get updated","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"},{"author":{"_account_id":11685,"name":"Stephen Balukoff","email":"stephen@balukoff.com","username":"sbalukoff"},"change_message_id":"e95246e243b6e24a35bd8015e08f18b2e755144c","unresolved":false,"context_lines":[{"line_number":1246,"context_line":"                                      peer_port\u003dport)"},{"line_number":1247,"context_line":""},{"line_number":1248,"context_line":"    def revert(self, loadbalancer, *args, **kwargs):"},{"line_number":1249,"context_line":"        for listener in loadbalancer.listeners:"},{"line_number":1250,"context_line":"            self.listener_repo.update(db_apis.get_session(), listener.id,"},{"line_number":1251,"context_line":"                                      peer_port\u003dNone)"}],"source_content_type":"text/x-python","patch_set":27,"id":"9aed3d3a_04acd48a","line":1249,"range":{"start_line":1249,"start_character":12,"end_line":1249,"end_character":20},"in_reply_to":"9aed3d3a_69b779f5","updated":"2016-02-29 06:44:33.000000000","message":"Er... see, that\u0027s the problem: \"despite DB errors\" means that at least one of them had an error, and therefore it\u0027s impossible to update all listeners. Again, we can *attempt* to update all listeners, but I suspect the plausible causes of one listener\u0027s update working when the next one fails are likely to mean there are much bigger problems happening at the moment, so retrying here is fairly pointless. :/","commit_id":"2e43f3031745f5971de5cf70af9c0704968955bd"}]}
