)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a98ed3bf3f0636177d098e7aa073d4d57d31c8d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added retries in \u0027network_set_host\u0027 function"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In concurrent transtactions in \u0027network_set_host\u0027 function"},{"line_number":10,"context_line":"could happen a deadlock or returned rows_updated value"},{"line_number":11,"context_line":"could be equal to 0."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da86d52c_d4741438","line":9,"updated":"2015-02-16 18:55:12.000000000","message":"s/transtactions/transactions/","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"846fe99a9f4b16de2564a696d7bdfdff454dc409","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added retries in \u0027network_set_host\u0027 function"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"In concurrent transtactions in \u0027network_set_host\u0027 function"},{"line_number":10,"context_line":"could happen a deadlock or returned rows_updated value"},{"line_number":11,"context_line":"could be equal to 0."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da86d52c_b4fb2047","line":9,"in_reply_to":"da86d52c_d4741438","updated":"2015-02-16 19:02:45.000000000","message":"Will be fixed","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a98ed3bf3f0636177d098e7aa073d4d57d31c8d","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In these cases we should retry the transaction to get"},{"line_number":14,"context_line":"another row and try to set the host again."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I374b12e62f76810ffdb1e2d35af72a738ead5591"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da86d52c_b4ca4044","line":15,"updated":"2015-02-16 18:55:12.000000000","message":"Needs a bug since this is a bug fix and could be present in stable branches.","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"ca6164c325b5b6fc792fe405ee883fda1dc982b2","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In these cases we should retry the transaction to get"},{"line_number":14,"context_line":"another row and try to set the host again."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I374b12e62f76810ffdb1e2d35af72a738ead5591"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da86d52c_79beee01","line":15,"in_reply_to":"da86d52c_349730ed","updated":"2015-02-17 08:56:19.000000000","message":"I\u0027ve filed the bug and assigned it to me","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"846fe99a9f4b16de2564a696d7bdfdff454dc409","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In these cases we should retry the transaction to get"},{"line_number":14,"context_line":"another row and try to set the host again."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I374b12e62f76810ffdb1e2d35af72a738ead5591"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"da86d52c_349730ed","line":15,"in_reply_to":"da86d52c_b4ca4044","updated":"2015-02-16 19:02:45.000000000","message":"There is no bug just right now. It will be created soon by another contributor and I will add it here.","commit_id":"68f62133e705cc5273553435233834dca7154d20"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a98ed3bf3f0636177d098e7aa073d4d57d31c8d","unresolved":false,"context_lines":[{"line_number":2946,"context_line":""},{"line_number":2947,"context_line":""},{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_94245c0f","line":2949,"updated":"2015-02-16 18:55:12.000000000","message":"Where is the deadlock case tested?","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b714332dd76466ec4f5ce66d73e3490d74fd563a","unresolved":false,"context_lines":[{"line_number":2946,"context_line":""},{"line_number":2947,"context_line":""},{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_6801c803","line":2949,"in_reply_to":"da86d52c_34be5065","updated":"2015-02-16 19:05:52.000000000","message":"Yeah but can\u0027t we mock out a db API call here to raise db_exc.DBDeadlock to verify the decorator is in place on this method and works?","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"efd48c54510dd5f47d28726227f77e4e6c2408b2","unresolved":false,"context_lines":[{"line_number":2946,"context_line":""},{"line_number":2947,"context_line":""},{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b7f79dd3","line":2949,"in_reply_to":"da86d52c_6801c803","updated":"2015-02-16 21:44:15.000000000","message":"I can think about it, do you have some ideas?","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"846fe99a9f4b16de2564a696d7bdfdff454dc409","unresolved":false,"context_lines":[{"line_number":2946,"context_line":""},{"line_number":2947,"context_line":""},{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_34be5065","line":2949,"in_reply_to":"da86d52c_94245c0f","updated":"2015-02-16 19:02:45.000000000","message":"It isn\u0027t. This decorator is needed if deadlock will happen like in all other functions","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"ca6164c325b5b6fc792fe405ee883fda1dc982b2","unresolved":false,"context_lines":[{"line_number":2946,"context_line":""},{"line_number":2947,"context_line":""},{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_99bd6205","line":2949,"in_reply_to":"da86d52c_b7f79dd3","updated":"2015-02-17 08:56:19.000000000","message":"Done","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a98ed3bf3f0636177d098e7aa073d4d57d31c8d","unresolved":false,"context_lines":[{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"},{"line_number":2953,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_b4c32038","line":2951,"updated":"2015-02-16 18:55:12.000000000","message":"This is fancy pants.","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":3189,"name":"Chet Burgess","email":"cfb@metacloud.com","username":"cfb-n"},"change_message_id":"9599448fd6f968b11a4ba8f0489c247ca8a91219","unresolved":false,"context_lines":[{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"},{"line_number":2953,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_14178c55","line":2951,"in_reply_to":"da86d52c_14622c16","updated":"2015-02-16 19:05:40.000000000","message":"Fancy pants yes, but its not offensive or dirty.","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"846fe99a9f4b16de2564a696d7bdfdff454dc409","unresolved":false,"context_lines":[{"line_number":2948,"context_line":"@require_admin_context"},{"line_number":2949,"context_line":"@_retry_on_deadlock"},{"line_number":2950,"context_line":"@retrying.retry(stop_max_attempt_number\u003d5, retry_on_exception\u003d"},{"line_number":2951,"context_line":"                lambda e: isinstance(e, exception.NetworkSetHostFailed))"},{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"},{"line_number":2953,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_14622c16","line":2951,"in_reply_to":"da86d52c_b4c32038","updated":"2015-02-16 19:02:45.000000000","message":"I think it is good :)","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":3189,"name":"Chet Burgess","email":"cfb@metacloud.com","username":"cfb-n"},"change_message_id":"9599448fd6f968b11a4ba8f0489c247ca8a91219","unresolved":false,"context_lines":[{"line_number":2958,"context_line":"    if not rows_updated:"},{"line_number":2959,"context_line":"        LOG.debug(\u0027The row was updated in a concurrent transaction, \u0027"},{"line_number":2960,"context_line":"                  \u0027we will fetch another row\u0027)"},{"line_number":2961,"context_line":"        raise exception.NetworkSetHostFailed(network_id\u003dnetwork_id)"},{"line_number":2962,"context_line":""},{"line_number":2963,"context_line":""},{"line_number":2964,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_081ccc69","line":2961,"updated":"2015-02-16 19:05:40.000000000","message":"Previously we would return NetworkNotFound, is there anything in the code that was expecting or messaging on that error that needs to be updated to account for NetworkSetHostFailed?","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"efd48c54510dd5f47d28726227f77e4e6c2408b2","unresolved":false,"context_lines":[{"line_number":2958,"context_line":"    if not rows_updated:"},{"line_number":2959,"context_line":"        LOG.debug(\u0027The row was updated in a concurrent transaction, \u0027"},{"line_number":2960,"context_line":"                  \u0027we will fetch another row\u0027)"},{"line_number":2961,"context_line":"        raise exception.NetworkSetHostFailed(network_id\u003dnetwork_id)"},{"line_number":2962,"context_line":""},{"line_number":2963,"context_line":""},{"line_number":2964,"context_line":"@require_context"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_576021a4","line":2961,"in_reply_to":"da86d52c_081ccc69","updated":"2015-02-16 21:44:15.000000000","message":"The behavior is updated, I think no","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"22999be19d02f990490637408f0216af5d4b20bf","unresolved":false,"context_lines":[{"line_number":2953,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"},{"line_number":2955,"context_line":"        filter_by(host\u003dNone).\\"},{"line_number":2956,"context_line":"        update({\u0027host\u0027: host_id})"},{"line_number":2957,"context_line":""},{"line_number":2958,"context_line":"    if not rows_updated:"},{"line_number":2959,"context_line":"        LOG.debug(\u0027The row was updated in a concurrent transaction, \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_af048bc6","line":2956,"updated":"2015-02-17 14:28:16.000000000","message":"Hmm, so the point of this method is to ensure that the network with id of \"network_id\" has its host set to the host_id parameter. If another thread has already updated the network record\u0027s host column to this host_id, that is perfectly fine -- it\u0027s the result we wanted in the first place. But this code will retry the UPDATE over and over again because host will not be None.\n\nTherefore, you need to change this method in the following ways:\n\n1) Do a read of the network record in question\n\n2) Check that the network\u0027s host value is host_id already. If it is already host_id, then simple return None.\n\n3) If the host field is not host_id, check if host is None. If the host is None, attempt the update above.\n\nSo, the code here should look something like this:\n\n # Let exc.NotFound bubble up out of this method. If the network with\n # network_id doesn\u0027t exist, that\u0027s a major failure.\n net_rec \u003d _network_get_query(context).filter_by(id\u003dnetwork_id).one()\n if net_rec.host \u003d\u003d host_id:\n     return None  # everything is as we want it to be.\n \n # If the host has been set to something other than our host_id, then that\n # also is a big problem, and we\u0027ll need to raise an exception here to allow\n # for re-allocation of another network for this instance.\n if net_ref.host is not None:\n     msg \u003d _(\"Network is assigned to another host %s!\") % net_ref.host\n     raise exc.NetworkAlreadyAssigned(msg)\n\n # host is None, so try our update...\n rows_updated \u003d _network_get_query(context).filter_by(id\u003dnetwork_id).\\\n                         filter_by(host\u003dNone).update({\u0027host\u0027: host_id})\n if not rows_updated:\n     LOG.debug(\u0027The row was updated in a concurrent transaction, \u0027\n            \u0027we will fetch another row\u0027)\n     raise exception.RetryOnDeadlock","commit_id":"1b411c0310c9297d3539eb8c78be0ff9544988e2"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"6cb7a58340dc788484df21eef291586807188115","unresolved":false,"context_lines":[{"line_number":2953,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"},{"line_number":2955,"context_line":"        filter_by(host\u003dNone).\\"},{"line_number":2956,"context_line":"        update({\u0027host\u0027: host_id})"},{"line_number":2957,"context_line":""},{"line_number":2958,"context_line":"    if not rows_updated:"},{"line_number":2959,"context_line":"        LOG.debug(\u0027The row was updated in a concurrent transaction, \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_b5dcde19","line":2956,"in_reply_to":"da86d52c_af048bc6","updated":"2015-02-17 15:17:22.000000000","message":"Jay, thank you for so nice detailed comment. I think I\u0027ve got it) please check","commit_id":"1b411c0310c9297d3539eb8c78be0ff9544988e2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"0ce4b1cfcc89ca461540f927e3cc5d495f0d26ec","unresolved":false,"context_lines":[{"line_number":2952,"context_line":"def network_set_host(context, network_id, host_id):"},{"line_number":2953,"context_line":"    network_ref \u003d _network_get_query(context).\\"},{"line_number":2954,"context_line":"        filter_by(id\u003dnetwork_id).\\"},{"line_number":2955,"context_line":"        first()"},{"line_number":2956,"context_line":""},{"line_number":2957,"context_line":"    if network_ref.host \u003d\u003d host_id:"},{"line_number":2958,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":3,"id":"da86d52c_754d06c4","line":2955,"updated":"2015-02-17 17:33:40.000000000","message":"first() does not raise an exception. one() does, though. You need to use one() here otherwise line 2957 wlll raise AttributeError when NoneType doesn\u0027t have a \"host\" attribute.","commit_id":"e21e78e74ce381847233dbb14dc55fd185729d00"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"219f4f78df88943cd75291505149530f1e58f997","unresolved":false,"context_lines":[{"line_number":2912,"context_line":"        raise exception.NetworkNotFound(network_id\u003dnetwork_id)"},{"line_number":2913,"context_line":""},{"line_number":2914,"context_line":"    if network_ref.host:"},{"line_number":2915,"context_line":"        return None"},{"line_number":2916,"context_line":""},{"line_number":2917,"context_line":"    rows_updated \u003d _network_get_query(context).\\"},{"line_number":2918,"context_line":"        filter_by(id\u003dnetwork_id).\\"}],"source_content_type":"text/x-python","patch_set":5,"id":"da86d52c_63e355d8","line":2915,"updated":"2015-02-18 17:19:30.000000000","message":"Note to reviewers: This right here mimics the previous behaviour which simply ignored things when the host field of the network with network_id was already set...","commit_id":"a732a6f90caaaedc5027648c0eb0ee1294b491cf"}],"nova/tests/unit/db/test_db_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6a98ed3bf3f0636177d098e7aa073d4d57d31c8d","unresolved":false,"context_lines":[{"line_number":5650,"context_line":"    def test_network_set_host_already_set(self):"},{"line_number":5651,"context_line":"        values \u003d {\u0027host\u0027: \u0027example.com\u0027, \u0027project_id\u0027: \u0027project1\u0027}"},{"line_number":5652,"context_line":"        network \u003d db.network_create_safe(self.ctxt, values)"},{"line_number":5653,"context_line":"        self.assertRaises(exception.NetworkSetHostFailed, db.network_set_host,"},{"line_number":5654,"context_line":"            self.ctxt, network.id, \u0027new.example.com\u0027)"},{"line_number":5655,"context_line":""},{"line_number":5656,"context_line":"    def test_network_set_host_with_initially_no_host(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_943d3c2f","line":5653,"updated":"2015-02-16 18:55:12.000000000","message":"So in this case we\u0027re going to retry the DB call 5 times even though the operation was already completed?  I guess that\u0027s better than failing.","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b714332dd76466ec4f5ce66d73e3490d74fd563a","unresolved":false,"context_lines":[{"line_number":5650,"context_line":"    def test_network_set_host_already_set(self):"},{"line_number":5651,"context_line":"        values \u003d {\u0027host\u0027: \u0027example.com\u0027, \u0027project_id\u0027: \u0027project1\u0027}"},{"line_number":5652,"context_line":"        network \u003d db.network_create_safe(self.ctxt, values)"},{"line_number":5653,"context_line":"        self.assertRaises(exception.NetworkSetHostFailed, db.network_set_host,"},{"line_number":5654,"context_line":"            self.ctxt, network.id, \u0027new.example.com\u0027)"},{"line_number":5655,"context_line":""},{"line_number":5656,"context_line":"    def test_network_set_host_with_initially_no_host(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_e833f8f4","line":5653,"in_reply_to":"da86d52c_344c909d","updated":"2015-02-16 19:05:52.000000000","message":"I\u0027m just confirming my understanding, but if this is going to call the DB API 5 times for something that\u0027s not going to update, what\u0027s the difference between this test and test_network_set_host_failed_with_retry except for the mock and asserts?","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"846fe99a9f4b16de2564a696d7bdfdff454dc409","unresolved":false,"context_lines":[{"line_number":5650,"context_line":"    def test_network_set_host_already_set(self):"},{"line_number":5651,"context_line":"        values \u003d {\u0027host\u0027: \u0027example.com\u0027, \u0027project_id\u0027: \u0027project1\u0027}"},{"line_number":5652,"context_line":"        network \u003d db.network_create_safe(self.ctxt, values)"},{"line_number":5653,"context_line":"        self.assertRaises(exception.NetworkSetHostFailed, db.network_set_host,"},{"line_number":5654,"context_line":"            self.ctxt, network.id, \u0027new.example.com\u0027)"},{"line_number":5655,"context_line":""},{"line_number":5656,"context_line":"    def test_network_set_host_with_initially_no_host(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_344c909d","line":5653,"in_reply_to":"da86d52c_943d3c2f","updated":"2015-02-16 19:02:45.000000000","message":"So, this is an updated behaviour, what is wrong here?\nIt should retry because deadlock or 0 rows_updated could possibly happen.","commit_id":"68f62133e705cc5273553435233834dca7154d20"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"efd48c54510dd5f47d28726227f77e4e6c2408b2","unresolved":false,"context_lines":[{"line_number":5650,"context_line":"    def test_network_set_host_already_set(self):"},{"line_number":5651,"context_line":"        values \u003d {\u0027host\u0027: \u0027example.com\u0027, \u0027project_id\u0027: \u0027project1\u0027}"},{"line_number":5652,"context_line":"        network \u003d db.network_create_safe(self.ctxt, values)"},{"line_number":5653,"context_line":"        self.assertRaises(exception.NetworkSetHostFailed, db.network_set_host,"},{"line_number":5654,"context_line":"            self.ctxt, network.id, \u0027new.example.com\u0027)"},{"line_number":5655,"context_line":""},{"line_number":5656,"context_line":"    def test_network_set_host_with_initially_no_host(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_37364db5","line":5653,"in_reply_to":"da86d52c_e833f8f4","updated":"2015-02-16 21:44:15.000000000","message":"Your understanding is correct. In general there is no much difference. Here I try to save the old test and then add two new tests that show that retries really work and calc mock.call_count","commit_id":"68f62133e705cc5273553435233834dca7154d20"}]}
