)]}'
{"oslo_db/sqlalchemy/enginefacade.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"98fe275d99f375c500c15e9086a3f9d5e4ec4cd8","unresolved":false,"context_lines":[{"line_number":654,"context_line":"    def reader_allows_async(self):"},{"line_number":655,"context_line":"        \"\"\"Modifier to set the transaction to READER."},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        It allows async operations if asynchronous session is already"},{"line_number":658,"context_line":"        started in this context."},{"line_number":659,"context_line":"        \"\"\""},{"line_number":660,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_654fd26b","line":657,"updated":"2015-11-26 10:15:54.000000000","message":"Let\u0027s also document the use case we need in Nova:\n\nIn Nova DB API methods should have a \u0027safe\u0027 default (i.e. READER), so that they can start sessions on their own, but it would also be useful for them to be able to participate in an existing ASYNC_READER session, if one was started up the stack. \n\nMarking such DB API methods with READER would make it impossible to use them in ASYNC_READER transactions, and marking with ASYNC_READER would require a modification of all the place these DB API methods are called to force READER mode, where the latest DB state is required.","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"baf400abcfea2e2b89abe4239ee6ca28191ddcbf","unresolved":false,"context_lines":[{"line_number":654,"context_line":"    def reader_allows_async(self):"},{"line_number":655,"context_line":"        \"\"\"Modifier to set the transaction to READER."},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        It allows async operations if asynchronous session is already"},{"line_number":658,"context_line":"        started in this context."},{"line_number":659,"context_line":"        \"\"\""},{"line_number":660,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_775bfbf6","line":657,"in_reply_to":"9a8ffd7b_654fd26b","updated":"2015-11-26 13:38:55.000000000","message":"fixed, text was nice, almost copied :)","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":11816,"name":"mike bayer","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"c092b36fe84fb5609a62cf5dbc086dd5c5a51a07","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        return self._clone(mode\u003d_READER)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @property"},{"line_number":654,"context_line":"    def reader_allows_async(self):"},{"line_number":655,"context_line":"        \"\"\"Modifier to set the transaction to READER."},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        It allows async operations if asynchronous session is already"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_0dd14023","line":654,"updated":"2015-11-26 13:55:12.000000000","message":"two things:\n\n1. \"allow_async\",  use verbs, not adjectives when available\n\n2. \"allow_async\" is a separate modifier.  So I\u0027d make this just \"allow_async\", and \"self._clone(allow_async\u003dTrue)\" - that is, instead of:\n\n   @enginefacade.reader_allow_async\n\nit would be:\n\n   @enginefacade.reader.allow_async\n\nthis makes it consistent w/ everything else, and the \"allow_async\" modifier can now be directly contrasted with the \"async\" modifier (Which also requires that @reader is already called)","commit_id":"d20f982804bdc85d7bf06810a900e709aa7ffd78"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"2cc15ebbb35c6a03262c4f6777b084af1a2bbd8c","unresolved":false,"context_lines":[{"line_number":651,"context_line":"        return self._clone(mode\u003d_READER)"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @property"},{"line_number":654,"context_line":"    def reader_allows_async(self):"},{"line_number":655,"context_line":"        \"\"\"Modifier to set the transaction to READER."},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        It allows async operations if asynchronous session is already"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_f7efe6e6","line":654,"in_reply_to":"9a8ffd7b_0dd14023","updated":"2015-11-26 14:28:13.000000000","message":"nice suggestion, fixed","commit_id":"d20f982804bdc85d7bf06810a900e709aa7ffd78"}],"oslo_db/tests/sqlalchemy/test_enginefacade.py":[{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"98fe275d99f375c500c15e9086a3f9d5e4ec4cd8","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            \"to a READER mid-transaction\","},{"line_number":583,"context_line":"            exc.args[0]"},{"line_number":584,"context_line":"        )"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def test_reader_allows_async_nested_in_async_reader_not_raises(self):"},{"line_number":587,"context_line":"        context \u003d oslo_context.RequestContext()"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_7f899f74","line":585,"updated":"2015-11-26 10:15:54.000000000","message":"maybe add an additional test case for this new decorator to make the default session mode is reader?","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"baf400abcfea2e2b89abe4239ee6ca28191ddcbf","unresolved":false,"context_lines":[{"line_number":582,"context_line":"            \"to a READER mid-transaction\","},{"line_number":583,"context_line":"            exc.args[0]"},{"line_number":584,"context_line":"        )"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"    def test_reader_allows_async_nested_in_async_reader_not_raises(self):"},{"line_number":587,"context_line":"        context \u003d oslo_context.RequestContext()"},{"line_number":588,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_1244fd47","line":585,"in_reply_to":"9a8ffd7b_7f899f74","updated":"2015-11-26 13:38:55.000000000","message":"yes, added","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"98fe275d99f375c500c15e9086a3f9d5e4ec4cd8","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            context.session.execute(\"test2\")"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        # no exception raised"},{"line_number":599,"context_line":"        go1(context)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_writer_nested_in_async_reader_raises(self):"},{"line_number":602,"context_line":"        context \u003d oslo_context.RequestContext()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_9fb7a339","line":599,"updated":"2015-11-26 10:15:54.000000000","message":"can we also test here that the session is in async mode?","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":10618,"name":"Pavel Kholkin","email":"p.v.holkin@mail.ru","username":"pkholkin"},"change_message_id":"baf400abcfea2e2b89abe4239ee6ca28191ddcbf","unresolved":false,"context_lines":[{"line_number":596,"context_line":"            context.session.execute(\"test2\")"},{"line_number":597,"context_line":""},{"line_number":598,"context_line":"        # no exception raised"},{"line_number":599,"context_line":"        go1(context)"},{"line_number":600,"context_line":""},{"line_number":601,"context_line":"    def test_writer_nested_in_async_reader_raises(self):"},{"line_number":602,"context_line":"        context \u003d oslo_context.RequestContext()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_722309a8","line":599,"in_reply_to":"9a8ffd7b_9fb7a339","updated":"2015-11-26 13:38:55.000000000","message":"Done","commit_id":"d240853a5d9e46ccc4e351aa5ba7a8a78df1b095"},{"author":{"_account_id":9555,"name":"Matthew Booth","email":"mbooth@redhat.com","username":"MatthewBooth"},"change_message_id":"d56250980fed8ca680aaa4833b24c2d7007c1559","unresolved":false,"context_lines":[{"line_number":591,"context_line":"            context.session.execute(\"test1\")"},{"line_number":592,"context_line":"            go2(context)"},{"line_number":593,"context_line":""},{"line_number":594,"context_line":"        @enginefacade.reader.reader_allows_async"},{"line_number":595,"context_line":"        def go2(context):"},{"line_number":596,"context_line":"            context.session.execute(\"test2\")"},{"line_number":597,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a8ffd7b_31dededd","line":594,"updated":"2015-11-26 14:07:47.000000000","message":"Agree with Mike that this should be allows_async","commit_id":"d20f982804bdc85d7bf06810a900e709aa7ffd78"}]}
