)]}'
{"neutron/db/quota/api.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"34e3f910985fd7ed798ee5718b0863542fae0a79","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            usage_data.in_use \u003d in_use"},{"line_number":120,"context_line":"        # After an explicit update the dirty bit should always be reset"},{"line_number":121,"context_line":"        usage_data.dirty \u003d False"},{"line_number":122,"context_line":"        return QuotaUsageInfo(usage_data.resource,"},{"line_number":123,"context_line":"                              usage_data.tenant_id,"},{"line_number":124,"context_line":"                              usage_data.in_use,"},{"line_number":125,"context_line":"                              usage_data.dirty)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_7656225d","line":122,"updated":"2016-11-02 14:08:18.000000000","message":"why is this under the transaction?","commit_id":"2a296737ab98f6df4ff708d6083866068c29a0f6"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9d7ccd5e41cc2c4e6776a53dde8d7f6cf78ec941","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            usage_data.in_use \u003d in_use"},{"line_number":120,"context_line":"        # After an explicit update the dirty bit should always be reset"},{"line_number":121,"context_line":"        usage_data.dirty \u003d False"},{"line_number":122,"context_line":"        return QuotaUsageInfo(usage_data.resource,"},{"line_number":123,"context_line":"                              usage_data.tenant_id,"},{"line_number":124,"context_line":"                              usage_data.in_use,"},{"line_number":125,"context_line":"                              usage_data.dirty)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_5f9cd15c","line":122,"in_reply_to":"ba5da102_1c5427fd","updated":"2016-11-02 15:05:48.000000000","message":"So, if this won\u0027t be moved under transaction we will have DetachedInctance error for this line as we try to get values from object that is not in current session.","commit_id":"2a296737ab98f6df4ff708d6083866068c29a0f6"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ed99d495c36bc98c1417c1a9f5d0914bfc951adc","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            usage_data.in_use \u003d in_use"},{"line_number":120,"context_line":"        # After an explicit update the dirty bit should always be reset"},{"line_number":121,"context_line":"        usage_data.dirty \u003d False"},{"line_number":122,"context_line":"        return QuotaUsageInfo(usage_data.resource,"},{"line_number":123,"context_line":"                              usage_data.tenant_id,"},{"line_number":124,"context_line":"                              usage_data.in_use,"},{"line_number":125,"context_line":"                              usage_data.dirty)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5da102_1c5427fd","line":122,"in_reply_to":"ba5da102_7656225d","updated":"2016-11-02 14:37:27.000000000","message":"We need to use usage_data that exists within transaction above and at the end of the block the transaction will be over. The connection at that point is closed. Previously it worked because it created a new connection / transaction implicitly.\n\nI mentioned this in commit message.","commit_id":"2a296737ab98f6df4ff708d6083866068c29a0f6"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"bd5111cfe9eac2025a5faa54a7d4702c2d9ef096","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    # Consider using begin_nested"},{"line_number":180,"context_line":"    with db_api.context_manager.writer.using(context):"},{"line_number":181,"context_line":"        expiration \u003d expiration or (utcnow() + datetime.timedelta(0, 120))"},{"line_number":182,"context_line":"        resv \u003d quota_models.Reservation(tenant_id\u003dtenant_id,"},{"line_number":183,"context_line":"                                        expiration\u003dexpiration)"},{"line_number":184,"context_line":"        context.session.add(resv)"},{"line_number":185,"context_line":"        for (resource, delta) in deltas.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa31d9ce_0bf15901","line":182,"updated":"2017-02-14 14:50:48.000000000","message":"Rather than an ugly flush statement, maybe for now just explicitly specify the ID of the reservation in the construction here:\n\nquota_models.Reservation(id\u003duuidutils.gen..(),\n                         tenant_id\u003dtenant_id,...","commit_id":"d91aa0643f2236e632ffd924fff8a3e36bc645c3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"46e1acd25b74ca7e9c7d0b5dabff342d61664d04","unresolved":false,"context_lines":[{"line_number":179,"context_line":"    # Consider using begin_nested"},{"line_number":180,"context_line":"    with db_api.context_manager.writer.using(context):"},{"line_number":181,"context_line":"        expiration \u003d expiration or (utcnow() + datetime.timedelta(0, 120))"},{"line_number":182,"context_line":"        resv \u003d quota_models.Reservation(tenant_id\u003dtenant_id,"},{"line_number":183,"context_line":"                                        expiration\u003dexpiration)"},{"line_number":184,"context_line":"        context.session.add(resv)"},{"line_number":185,"context_line":"        for (resource, delta) in deltas.items():"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa31d9ce_40e6cb15","line":182,"in_reply_to":"fa31d9ce_0bf15901","updated":"2017-02-14 15:30:27.000000000","message":"Done","commit_id":"d91aa0643f2236e632ffd924fff8a3e36bc645c3"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"fa5180e87065cce96f56119dac0b8ba0bdd3dfef","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                quota_models.ResourceDelta(resource\u003dresource,"},{"line_number":188,"context_line":"                                           amount\u003ddelta,"},{"line_number":189,"context_line":"                                           reservation\u003dresv))"},{"line_number":190,"context_line":"    return ReservationInfo(resv[\u0027id\u0027],"},{"line_number":191,"context_line":"                           resv[\u0027tenant_id\u0027],"},{"line_number":192,"context_line":"                           resv[\u0027expiration\u0027],"},{"line_number":193,"context_line":"                           dict((delta.resource, delta.amount)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa31d9ce_b05d1c17","line":190,"updated":"2017-02-14 14:29:17.000000000","message":"I found the issue with update_quota_limit.\n\nIt\u0027s originating here. These ReservationInfo objects are now getting a None for resv[\u0027id\u0027], which results in reservations not being correctly cancelled after resources are created.\n\nTo get this to work, I had to put ReservationInfo inside of the transaction and explicitly call a flush before referencing [\u0027id\u0027]. The column default doesn\u0027t apply until the INSERT statement is issued.\n\nThis will impact us on other make_dict functions we call inside transactions that expect default values as well.","commit_id":"d91aa0643f2236e632ffd924fff8a3e36bc645c3"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"46e1acd25b74ca7e9c7d0b5dabff342d61664d04","unresolved":false,"context_lines":[{"line_number":187,"context_line":"                quota_models.ResourceDelta(resource\u003dresource,"},{"line_number":188,"context_line":"                                           amount\u003ddelta,"},{"line_number":189,"context_line":"                                           reservation\u003dresv))"},{"line_number":190,"context_line":"    return ReservationInfo(resv[\u0027id\u0027],"},{"line_number":191,"context_line":"                           resv[\u0027tenant_id\u0027],"},{"line_number":192,"context_line":"                           resv[\u0027expiration\u0027],"},{"line_number":193,"context_line":"                           dict((delta.resource, delta.amount)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa31d9ce_80ec43f4","line":190,"in_reply_to":"fa31d9ce_b05d1c17","updated":"2017-02-14 15:30:27.000000000","message":"Done","commit_id":"d91aa0643f2236e632ffd924fff8a3e36bc645c3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"56e15901d9456822dbaeffa61fdeaadfafa5663f","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":109,"context_line":"@db_api.context_manager.writer"},{"line_number":110,"context_line":"def set_quota_usage_dirty(context, resource, tenant_id, dirty\u003dTrue):"},{"line_number":111,"context_line":"    \"\"\"Set quota usage dirty bit for a given resource and tenant."},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ffe62b97_ae47604c","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":30},"updated":"2017-03-28 15:26:03.000000000","message":"I noticed that you removed the reader decorators but you didn\u0027t do the same with writers, I just want to know the logic behind that.","commit_id":"57d3325be4b26490ede508f18ecdf3409444c6d8"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"b4dc7c8cf8d4795ad978033e04465e94bc518188","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":109,"context_line":"@db_api.context_manager.writer"},{"line_number":110,"context_line":"def set_quota_usage_dirty(context, resource, tenant_id, dirty\u003dTrue):"},{"line_number":111,"context_line":"    \"\"\"Set quota usage dirty bit for a given resource and tenant."},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ffe62b97_14cbe1a4","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":30},"in_reply_to":"ffe62b97_ae47604c","updated":"2017-03-29 07:21:26.000000000","message":"This writer is set by https://github.com/openstack/neutron/commit/3ad23f42c7b1fce8e34fce651e03614f28740868 Readers are not needed as we now do not have db operations in these methods as it is handled by objects.","commit_id":"57d3325be4b26490ede508f18ecdf3409444c6d8"}],"neutron/db/quota/driver.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c433ff7586f716e2baf2e32de051c52f274b85b8","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # locks should be ok to use when support for sending \"hotspot\" writes"},{"line_number":176,"context_line":"        # to a single node will be available."},{"line_number":177,"context_line":"        requested_resources \u003d deltas.keys()"},{"line_number":178,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":179,"context_line":"            # get_tenant_quotes needs in input a dictionary mapping resource"},{"line_number":180,"context_line":"            # name to BaseResosurce instances so that the default quota can be"},{"line_number":181,"context_line":"            # retrieved"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_ae694cfb","line":178,"updated":"2016-11-02 11:40:02.000000000","message":"We need to do this one too. I think you can create autonested_reader_transaction() and autonested_writer_transaction() functions for the new enginefacade work. Or something like that.","commit_id":"5e5682dd705b057c5e601ff94163022f565ac7f1"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"db63db9365fa3245c401a10dffb3f910f4b6b05d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # locks should be ok to use when support for sending \"hotspot\" writes"},{"line_number":176,"context_line":"        # to a single node will be available."},{"line_number":177,"context_line":"        requested_resources \u003d deltas.keys()"},{"line_number":178,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":179,"context_line":"            # get_tenant_quotes needs in input a dictionary mapping resource"},{"line_number":180,"context_line":"            # name to BaseResosurce instances so that the default quota can be"},{"line_number":181,"context_line":"            # retrieved"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_df0c68ee","line":178,"in_reply_to":"ba5da102_41e5e135","updated":"2016-11-02 12:34:33.000000000","message":"Yeah, we don\u0027t need autonested at all, this is handled by new enginefacade, I just miss this one, thanks!","commit_id":"5e5682dd705b057c5e601ff94163022f565ac7f1"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"6a03d04911b2d1b8e4f5d17ef61c9a62459ca052","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # locks should be ok to use when support for sending \"hotspot\" writes"},{"line_number":176,"context_line":"        # to a single node will be available."},{"line_number":177,"context_line":"        requested_resources \u003d deltas.keys()"},{"line_number":178,"context_line":"        with db_api.autonested_transaction(context.session):"},{"line_number":179,"context_line":"            # get_tenant_quotes needs in input a dictionary mapping resource"},{"line_number":180,"context_line":"            # name to BaseResosurce instances so that the default quota can be"},{"line_number":181,"context_line":"            # retrieved"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5da102_41e5e135","line":178,"in_reply_to":"ba5da102_ae694cfb","updated":"2016-11-02 11:43:56.000000000","message":"Or I guess we don\u0027t don\u0027t need autonested now?","commit_id":"5e5682dd705b057c5e601ff94163022f565ac7f1"}]}
