)]}'
{"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"88521f92587b73fc6a8a8fcbe3e4a0bc253eb2f4","unresolved":false,"context_lines":[{"line_number":2884,"context_line":"        volume_ref.save(session\u003dsession)"},{"line_number":2885,"context_line":""},{"line_number":2886,"context_line":"    meta \u003d volume_metadata_get(context, volume_ref.id)"},{"line_number":2887,"context_line":"    volume_ref.metadata \u003d meta"},{"line_number":2888,"context_line":""},{"line_number":2889,"context_line":"    result \u003d model_query(context, models.Volume, read_deleted\u003d\"no\").\\"},{"line_number":2890,"context_line":"                         options(joinedload(\u0027volume_metadata\u0027)).\\"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FYEM%3D","line":2887,"updated":"2012-09-17 20:39:27.000000000","message":"I wanted to disagree with bcwaldon here and say \"let\u0027s just sync whatever was merged into cinder\" but these two lines look totally redundant to me","commit_id":"67a412a7cf0bc38f08d3c5d8a0867d9129ccb3e9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"88521f92587b73fc6a8a8fcbe3e4a0bc253eb2f4","unresolved":false,"context_lines":[{"line_number":2892,"context_line":"    if not result:"},{"line_number":2893,"context_line":"        raise exception.VolumeNotFound(volume_id\u003dvolume_ref[\u0027id\u0027])"},{"line_number":2894,"context_line":""},{"line_number":2895,"context_line":"    return result"},{"line_number":2896,"context_line":""},{"line_number":2897,"context_line":""},{"line_number":2898,"context_line":"@require_admin_context"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAALH%2F%2FYEE%3D","line":2895,"updated":"2012-09-17 20:39:27.000000000","message":"this is the equivalent of doing volume_get()","commit_id":"67a412a7cf0bc38f08d3c5d8a0867d9129ccb3e9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"e3776dc86c259fc94447b8685bcb00c235677ea6","unresolved":false,"context_lines":[{"line_number":2931,"context_line":"    with session.begin():"},{"line_number":2932,"context_line":"        volume_ref.save(session\u003dsession)"},{"line_number":2933,"context_line":""},{"line_number":2934,"context_line":"    return volume_get(context, values[\u0027id\u0027], session\u003dsession)"},{"line_number":2935,"context_line":""},{"line_number":2936,"context_line":""},{"line_number":2937,"context_line":"@require_admin_context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FX8g%3D","line":2934,"updated":"2012-09-17 22:01:56.000000000","message":"Re-using the just committed session seemed odd to me, but apparently it\u0027s ok\n\n  http://docs.sqlalchemy.org/en/rel_0_7/orm/session.html#managing-transactions\n\n  When the transactional state is completed after a rollback or commit, the Session releases all Transaction and Connection resources (...), and goes back to the “begin” state, which will again invoke new Connection and Transaction objects as new requests to emit SQL statements are received.","commit_id":"9733b4eb9f3aeadd29f8dd8b00a37ce3d454edb8"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"d5d0d7521e3412e9e35c19bf95da57ba505833ad","unresolved":false,"context_lines":[{"line_number":2931,"context_line":"    with session.begin():"},{"line_number":2932,"context_line":"        volume_ref.save(session\u003dsession)"},{"line_number":2933,"context_line":""},{"line_number":2934,"context_line":"    return volume_get(context, values[\u0027id\u0027], session\u003dsession)"},{"line_number":2935,"context_line":""},{"line_number":2936,"context_line":""},{"line_number":2937,"context_line":"@require_admin_context"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2FX2s%3D","line":2934,"in_reply_to":"AAAALH%2F%2FX8g%3D","updated":"2012-09-17 23:20:05.000000000","message":"The issue that forced me to do the get after create like this to begin with is that the reference did not have the metadata until after the commit.  There were other methods that may have worked, however my main thought here was that we should return exactly the same thing on a create as we do on a get.  This enforces that, and takes out any risk of the two not being synced up after any future changes.","commit_id":"9733b4eb9f3aeadd29f8dd8b00a37ce3d454edb8"}]}
