)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ff10d6b3001e97eb3379467ca0cda9a461f02867","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"db: remove unnecessary flush"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This exposes known l3 plugin bug as unit test failures."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I5042e05e53ee420e5c2e1562515ab2972481c430"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"9f436f4f_701bf372","line":9,"range":{"start_line":9,"start_character":13,"end_line":9,"end_character":32},"updated":"2017-08-20 07:42:54.000000000","message":"It would be interesting to reference for people not familiar with the project. Right?","commit_id":"0e79cc2a3ade0180de55aa1b75b941b7b507c71b"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"323f8c079c5685eb4e5344e0ede81dba4e2c9be7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"db: remove unnecessary flush in create_pending_row"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The contract of create_pending_row is to be called within a db"},{"line_number":10,"context_line":"transaction. (so is journal.recourd.) flush in it is work around to make"},{"line_number":11,"context_line":"unit tests work."},{"line_number":12,"context_line":"As tests were fixed by the previous patch, let\u0027s remove flush and add"},{"line_number":13,"context_line":"run-time check for such a common mistake to prevent future breakage."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7f287b81_c9b31d4d","line":10,"range":{"start_line":10,"start_character":0,"end_line":10,"end_character":37},"updated":"2017-08-24 06:32:41.000000000","message":"transaction (so is journal.record).","commit_id":"f5693ef46a243af7dc1199f22333f2ee982cb2ab"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"323f8c079c5685eb4e5344e0ede81dba4e2c9be7","unresolved":false,"context_lines":[{"line_number":12,"context_line":"As tests were fixed by the previous patch, let\u0027s remove flush and add"},{"line_number":13,"context_line":"run-time check for such a common mistake to prevent future breakage."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"This exposes known l3 plugin bug as unit test failures."},{"line_number":16,"context_line":"so it needs to be fixed first."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: I5042e05e53ee420e5c2e1562515ab2972481c430"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7f287b81_29dd0170","line":16,"range":{"start_line":15,"start_character":0,"end_line":16,"end_character":30},"updated":"2017-08-24 06:32:41.000000000","message":"The patch will surely follow this one, right? I don\u0027t think the explanation is needed.","commit_id":"f5693ef46a243af7dc1199f22333f2ee982cb2ab"}],"networking_odl/db/db.py":[{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"ff10d6b3001e97eb3379467ca0cda9a461f02867","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    session.add(row)"},{"line_number":142,"context_line":"    # Keep session flush for unit tests. NOOP for L2/L3 events since calls are"},{"line_number":143,"context_line":"    # made inside database session transaction with subtransactions\u003dTrue."},{"line_number":144,"context_line":"    session.flush()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_d025ffac","side":"PARENT","line":144,"range":{"start_line":144,"start_character":3,"end_line":144,"end_character":19},"updated":"2017-08-20 07:42:54.000000000","message":"How can we know if it\u0027s necessary or not? If we remove the line, is there a test (unit or functional) that will make sure that we are actually impacting the required ops in the DB without the flush?","commit_id":"3d72b8ac7c522d5ae153bba1cae713d4aabef90c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"34d3793b45f4cf4311fb8f44d2a765badcbe1e4f","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    session.add(row)"},{"line_number":142,"context_line":"    # Keep session flush for unit tests. NOOP for L2/L3 events since calls are"},{"line_number":143,"context_line":"    # made inside database session transaction with subtransactions\u003dTrue."},{"line_number":144,"context_line":"    session.flush()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_75c89e54","side":"PARENT","line":144,"range":{"start_line":144,"start_character":3,"end_line":144,"end_character":19},"in_reply_to":"7f287b81_bafe06ac","updated":"2017-08-23 08:33:34.000000000","message":"Yeah, your logic to remove it is correct and I agree with the change. Just there is no test that checks this. There is no justification for it to be there, nor a justification for it not to be there.","commit_id":"3d72b8ac7c522d5ae153bba1cae713d4aabef90c"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"937941b8dd12d1a9950c8d77a300be1f27c537fc","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    session.add(row)"},{"line_number":142,"context_line":"    # Keep session flush for unit tests. NOOP for L2/L3 events since calls are"},{"line_number":143,"context_line":"    # made inside database session transaction with subtransactions\u003dTrue."},{"line_number":144,"context_line":"    session.flush()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"@db_api.retry_db_errors"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f287b81_bafe06ac","side":"PARENT","line":144,"range":{"start_line":144,"start_character":3,"end_line":144,"end_character":19},"in_reply_to":"9f436f4f_d025ffac","updated":"2017-08-22 16:42:33.000000000","message":"the contract of this method is that this method should be called under db transaction.\nsame to precommit method.","commit_id":"3d72b8ac7c522d5ae153bba1cae713d4aabef90c"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"323f8c079c5685eb4e5344e0ede81dba4e2c9be7","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from sqlalchemy import or_"},{"line_number":20,"context_line":"from sqlalchemy.orm import aliased"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from networking_odl._i18n import _"},{"line_number":23,"context_line":"from networking_odl.common import constants as odl_const"},{"line_number":24,"context_line":"from networking_odl.db import models"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_666d7603","line":22,"updated":"2017-08-24 06:32:41.000000000","message":"question: in most of the code i18n is mostly non existent. Should we start using it?","commit_id":"f5693ef46a243af7dc1199f22333f2ee982cb2ab"},{"author":{"_account_id":26507,"name":"Michel Peterson","email":"michel@redhat.com","username":"mpeterson"},"change_message_id":"323f8c079c5685eb4e5344e0ede81dba4e2c9be7","unresolved":false,"context_lines":[{"line_number":130,"context_line":""},{"line_number":131,"context_line":"def create_pending_row(session, object_type, object_uuid,"},{"line_number":132,"context_line":"                       operation, data, depending_on\u003dNone):"},{"line_number":133,"context_line":"    # NOTE(yamahata): detect if this method is called outside db transaction."},{"line_number":134,"context_line":"    # it\u0027s quite common mistake."},{"line_number":135,"context_line":"    if not session.is_active:"},{"line_number":136,"context_line":"        raise RuntimeError("},{"line_number":137,"context_line":"            _(\"this method can\u0027t be called outside of a transaction\"))"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    if depending_on is None:"},{"line_number":140,"context_line":"        depending_on \u003d []"}],"source_content_type":"text/x-python","patch_set":5,"id":"7f287b81_090ec531","line":137,"range":{"start_line":133,"start_character":0,"end_line":137,"end_character":70},"updated":"2017-08-24 06:32:41.000000000","message":"If you create the transaction here then it\u0027s not needed and would simplify the code outside, right?\n\nOther than that, the NOTE is not needed. The code is self explanatory.\n\nAlso, write a test that does a assertRises() when session is not active.","commit_id":"f5693ef46a243af7dc1199f22333f2ee982cb2ab"}]}
