)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"02095087b550efdadabd012a9eb92e1eb70a2b90","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"d8565cda_5f855da6","updated":"2022-06-01 15:03:48.000000000","message":"Please, feel free to propose new topics to add to this patch, new examples, new use cases, whatever...","commit_id":"5cb581482d6f984b42e6adc0046a08501176509d"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"00f6e29d_a170f2ff","updated":"2022-06-01 15:51:02.000000000","message":"Thanks for the info Rodolfo, just some grammatical nits I noticed.","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"98c2380c_6bb68a3d","updated":"2022-06-03 14:49:08.000000000","message":"Thanks for the review, Brian.","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8e0e1c09080715d2248f985d2b1fb253766a91b9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"0a8a644d_ca474f8f","updated":"2022-06-03 15:34:49.000000000","message":"Just noticed some more nits after re-reading, I can update later if there\u0027s no other comments.","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"}],"doc/source/contributor/internals/db_layer.rst":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This section contains some common information that will be useful for"},{"line_number":28,"context_line":"developers that need to do some database changes and how to execute queries"},{"line_number":29,"context_line":"using the oslo.db API."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Difference between \u0027default\u0027 and \u0027server_default\u0027 parameters for columns"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3bbdab02_0a4bbb05","line":28,"range":{"start_line":28,"start_character":49,"end_line":28,"end_character":56},"updated":"2022-06-01 15:51:02.000000000","message":"nit: s/as well as","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":25,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"This section contains some common information that will be useful for"},{"line_number":28,"context_line":"developers that need to do some database changes and how to execute queries"},{"line_number":29,"context_line":"using the oslo.db API."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"Difference between \u0027default\u0027 and \u0027server_default\u0027 parameters for columns"}],"source_content_type":"text/x-rst","patch_set":2,"id":"6bdb087c_cc43e494","line":28,"range":{"start_line":28,"start_character":49,"end_line":28,"end_character":56},"in_reply_to":"3bbdab02_0a4bbb05","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":110,"context_line":"----------------"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"The main information reference is in `Usage \u003chttps://opendev.org/openstack/oslo.db/src/branch/master/doc/source/user/usage.rst\u003e`_,"},{"line_number":113,"context_line":"that provides a initial picture of how to use oslo.db in Neutron. Any request"},{"line_number":114,"context_line":"call to the Neutron server API must have a \"neutron_context\" parameter, that is"},{"line_number":115,"context_line":"an instance of `Context \u003chttps://opendev.org/openstack/neutron-lib/src/tag/2.21.0/neutron_lib/context.py#L142\u003e`_."},{"line_number":116,"context_line":"This context holds a `sqlalchemy.orm.session.Session` instance that \"manages"}],"source_content_type":"text/x-rst","patch_set":2,"id":"c998c695_c9996871","line":113,"range":{"start_line":113,"start_character":14,"end_line":113,"end_character":15},"updated":"2022-06-01 15:51:02.000000000","message":"s/an","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":110,"context_line":"----------------"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"The main information reference is in `Usage \u003chttps://opendev.org/openstack/oslo.db/src/branch/master/doc/source/user/usage.rst\u003e`_,"},{"line_number":113,"context_line":"that provides a initial picture of how to use oslo.db in Neutron. Any request"},{"line_number":114,"context_line":"call to the Neutron server API must have a \"neutron_context\" parameter, that is"},{"line_number":115,"context_line":"an instance of `Context \u003chttps://opendev.org/openstack/neutron-lib/src/tag/2.21.0/neutron_lib/context.py#L142\u003e`_."},{"line_number":116,"context_line":"This context holds a `sqlalchemy.orm.session.Session` instance that \"manages"}],"source_content_type":"text/x-rst","patch_set":2,"id":"73a19771_d8f37640","line":113,"range":{"start_line":113,"start_character":14,"end_line":113,"end_character":15},"in_reply_to":"c998c695_c9996871","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":119,"context_line":"\"holding zone\" for all loaded or associated objects during its lifespan."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"}],"source_content_type":"text/x-rst","patch_set":2,"id":"340730fe_353e6b56","line":122,"range":{"start_line":122,"start_character":46,"end_line":122,"end_character":47},"updated":"2022-06-01 15:51:02.000000000","message":"s/an","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":119,"context_line":"\"holding zone\" for all loaded or associated objects during its lifespan."},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a229fc7_feff5cd9","line":122,"range":{"start_line":122,"start_character":46,"end_line":122,"end_character":47},"in_reply_to":"340730fe_353e6b56","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff800fee_63ba0709","line":124,"range":{"start_line":123,"start_character":72,"end_line":124,"end_character":37},"updated":"2022-06-01 15:51:02.000000000","message":"s/the number of statements this transaction may have","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"80d98918_1f106995","line":124,"range":{"start_line":123,"start_character":72,"end_line":124,"end_character":37},"in_reply_to":"ff800fee_63ba0709","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1bb9a72f_f5884342","line":125,"range":{"start_line":125,"start_character":36,"end_line":125,"end_character":45},"updated":"2022-06-01 15:51:02.000000000","message":"s/statement","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":122,"context_line":"defined `Engine`. This transaction represents a SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of how"},{"line_number":124,"context_line":"many statements this transaction have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statament already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"35e13477_e8dfc2ce","line":125,"range":{"start_line":125,"start_character":36,"end_line":125,"end_character":45},"in_reply_to":"1bb9a72f_f5884342","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":129,"context_line":"Database transactions"},{"line_number":130,"context_line":"---------------------"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Any Neutron database operation, regardless of the type and the amount of them,"},{"line_number":133,"context_line":"should be executed inside a transaction. There are two type of transactions:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"* Reader: for reading operations."}],"source_content_type":"text/x-rst","patch_set":2,"id":"aab76669_d5f0c269","line":132,"range":{"start_line":132,"start_character":70,"end_line":132,"end_character":77},"updated":"2022-06-01 15:51:02.000000000","message":"I think you can just remove these two words and sentence still makes sense","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":129,"context_line":"Database transactions"},{"line_number":130,"context_line":"---------------------"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"Any Neutron database operation, regardless of the type and the amount of them,"},{"line_number":133,"context_line":"should be executed inside a transaction. There are two type of transactions:"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"* Reader: for reading operations."}],"source_content_type":"text/x-rst","patch_set":2,"id":"7a51a5ca_0a2d6075","line":132,"range":{"start_line":132,"start_character":70,"end_line":132,"end_character":77},"in_reply_to":"aab76669_d5f0c269","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The neutron-lib library provides an API wrapper for the oslo.db operations."},{"line_number":141,"context_line":"The `CONTEXT_READER` and `CONTEXT_WRITER` context managers can be used both"},{"line_number":142,"context_line":"as decorators or context managers. E.g.:"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":".. code-block:: python"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"4a63f89c_d20bff55","line":142,"range":{"start_line":142,"start_character":35,"end_line":142,"end_character":39},"updated":"2022-06-01 15:51:02.000000000","message":"nit: s/For example (I know that\u0027s what eg means just clearer)","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"The neutron-lib library provides an API wrapper for the oslo.db operations."},{"line_number":141,"context_line":"The `CONTEXT_READER` and `CONTEXT_WRITER` context managers can be used both"},{"line_number":142,"context_line":"as decorators or context managers. E.g.:"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":".. code-block:: python"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"2af9ae86_da336dfa","line":142,"range":{"start_line":142,"start_character":35,"end_line":142,"end_character":39},"in_reply_to":"4a63f89c_d20bff55","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":162,"context_line":"The transaction contexts can be nested. For example, if inside a context a"},{"line_number":163,"context_line":"decorated method is called, the current transaction is preserved. There is only"},{"line_number":164,"context_line":"one exception on this rule: a reader context cannot be upgraded to writer. That"},{"line_number":165,"context_line":"means inside a reader context is not possible to start a write context. The"},{"line_number":166,"context_line":"following exception will be raised:"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"4ef5781c_03c69b2d","line":165,"range":{"start_line":165,"start_character":30,"end_line":165,"end_character":32},"updated":"2022-06-01 15:51:02.000000000","message":"s/it is","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":162,"context_line":"The transaction contexts can be nested. For example, if inside a context a"},{"line_number":163,"context_line":"decorated method is called, the current transaction is preserved. There is only"},{"line_number":164,"context_line":"one exception on this rule: a reader context cannot be upgraded to writer. That"},{"line_number":165,"context_line":"means inside a reader context is not possible to start a write context. The"},{"line_number":166,"context_line":"following exception will be raised:"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"22b4af94_65a96afd","line":165,"range":{"start_line":165,"start_character":57,"end_line":165,"end_character":62},"updated":"2022-06-01 15:51:02.000000000","message":"s/writer","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"The transaction contexts can be nested. For example, if inside a context a"},{"line_number":163,"context_line":"decorated method is called, the current transaction is preserved. There is only"},{"line_number":164,"context_line":"one exception on this rule: a reader context cannot be upgraded to writer. That"},{"line_number":165,"context_line":"means inside a reader context is not possible to start a write context. The"},{"line_number":166,"context_line":"following exception will be raised:"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"6be5ab90_e2939b47","line":165,"range":{"start_line":165,"start_character":57,"end_line":165,"end_character":62},"in_reply_to":"22b4af94_65a96afd","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":162,"context_line":"The transaction contexts can be nested. For example, if inside a context a"},{"line_number":163,"context_line":"decorated method is called, the current transaction is preserved. There is only"},{"line_number":164,"context_line":"one exception on this rule: a reader context cannot be upgraded to writer. That"},{"line_number":165,"context_line":"means inside a reader context is not possible to start a write context. The"},{"line_number":166,"context_line":"following exception will be raised:"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"3b5e9ba0_646c4b13","line":165,"range":{"start_line":165,"start_character":30,"end_line":165,"end_character":32},"in_reply_to":"4ef5781c_03c69b2d","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":196,"context_line":"parameter in the method signature)."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"This retry decorator can be used along with a transaction decorator but the"},{"line_number":199,"context_line":"retry decorator must be declared before the context one. In the other way"},{"line_number":200,"context_line":"around, the retry context would be always called from inside an active"},{"line_number":201,"context_line":"transaction making it useless. E.g.:"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"c93f8ab6_242f8d6f","line":200,"range":{"start_line":199,"start_character":57,"end_line":200,"end_character":6},"updated":"2022-06-01 15:51:02.000000000","message":"s/In other words (?)","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":196,"context_line":"parameter in the method signature)."},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"This retry decorator can be used along with a transaction decorator but the"},{"line_number":199,"context_line":"retry decorator must be declared before the context one. In the other way"},{"line_number":200,"context_line":"around, the retry context would be always called from inside an active"},{"line_number":201,"context_line":"transaction making it useless. E.g.:"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":2,"id":"e3045950_c0cc1850","line":200,"range":{"start_line":199,"start_character":57,"end_line":200,"end_character":6},"in_reply_to":"c93f8ab6_242f8d6f","updated":"2022-06-03 14:49:08.000000000","message":"I\u0027ll rephrase that.","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"595b794bee4f1dc31a2d480f1b1885eb767aa1cd","unresolved":true,"context_lines":[{"line_number":198,"context_line":"This retry decorator can be used along with a transaction decorator but the"},{"line_number":199,"context_line":"retry decorator must be declared before the context one. In the other way"},{"line_number":200,"context_line":"around, the retry context would be always called from inside an active"},{"line_number":201,"context_line":"transaction making it useless. E.g.:"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":".. code-block:: python"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9870bc75_53bdcae5","line":201,"range":{"start_line":201,"start_character":31,"end_line":201,"end_character":35},"updated":"2022-06-01 15:51:02.000000000","message":"nit: s/For example","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e7bd40ee05c62fee4678b5223cec14a77c96b7a1","unresolved":false,"context_lines":[{"line_number":198,"context_line":"This retry decorator can be used along with a transaction decorator but the"},{"line_number":199,"context_line":"retry decorator must be declared before the context one. In the other way"},{"line_number":200,"context_line":"around, the retry context would be always called from inside an active"},{"line_number":201,"context_line":"transaction making it useless. E.g.:"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":".. code-block:: python"},{"line_number":204,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"40f30c81_b45223f8","line":201,"range":{"start_line":201,"start_character":31,"end_line":201,"end_character":35},"in_reply_to":"9870bc75_53bdcae5","updated":"2022-06-03 14:49:08.000000000","message":"Done","commit_id":"bbc100a686220266148acf631e6e9c5b722b6a3e"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8e0e1c09080715d2248f985d2b1fb253766a91b9","unresolved":true,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents an SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of the"},{"line_number":124,"context_line":"number of statements this transaction may have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statement already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."}],"source_content_type":"text/x-rst","patch_set":3,"id":"1d814f26_190856de","line":123,"range":{"start_line":123,"start_character":64,"end_line":123,"end_character":71},"updated":"2022-06-03 15:34:49.000000000","message":"s/Regardless\n\nSounds a little better.","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e2f0f193ba374b7dc50d77a7b815bc66e212896b","unresolved":false,"context_lines":[{"line_number":120,"context_line":""},{"line_number":121,"context_line":"A `Session` instance establishes a transaction to the database using the"},{"line_number":122,"context_line":"defined `Engine`. This transaction represents an SQL transaction that is \"a"},{"line_number":123,"context_line":"logical unit of work that contains one or more SQL statements\". Despite of the"},{"line_number":124,"context_line":"number of statements this transaction may have, the execution is atomic; if the"},{"line_number":125,"context_line":"transaction fails, any previous SQL statement already executed that implies a"},{"line_number":126,"context_line":"change in the database is undone (rollback)."}],"source_content_type":"text/x-rst","patch_set":3,"id":"a2fd5ea4_1452b252","line":123,"range":{"start_line":123,"start_character":64,"end_line":123,"end_character":71},"in_reply_to":"1d814f26_190856de","updated":"2022-06-06 11:51:21.000000000","message":"Done","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8e0e1c09080715d2248f985d2b1fb253766a91b9","unresolved":true,"context_lines":[{"line_number":179,"context_line":"allow the context wrapper (writer, reader) to properly finish the operation,"},{"line_number":180,"context_line":"for example rolling back the already executed commands. Check the patch"},{"line_number":181,"context_line":"`\u003chttps://review.opendev.org/c/openstack/neutron/+/843263\u003e`_ as an example of"},{"line_number":182,"context_line":"how handle database exceptions."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"Retry decorators"}],"source_content_type":"text/x-rst","patch_set":3,"id":"1e41e7e8_bb58e834","line":182,"range":{"start_line":182,"start_character":0,"end_line":182,"end_character":3},"updated":"2022-06-03 15:34:49.000000000","message":"s/how to","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e2f0f193ba374b7dc50d77a7b815bc66e212896b","unresolved":false,"context_lines":[{"line_number":179,"context_line":"allow the context wrapper (writer, reader) to properly finish the operation,"},{"line_number":180,"context_line":"for example rolling back the already executed commands. Check the patch"},{"line_number":181,"context_line":"`\u003chttps://review.opendev.org/c/openstack/neutron/+/843263\u003e`_ as an example of"},{"line_number":182,"context_line":"how handle database exceptions."},{"line_number":183,"context_line":""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"Retry decorators"}],"source_content_type":"text/x-rst","patch_set":3,"id":"f1ad2c00_08f66f05","line":182,"range":{"start_line":182,"start_character":0,"end_line":182,"end_character":3},"in_reply_to":"1e41e7e8_bb58e834","updated":"2022-06-06 11:51:21.000000000","message":"Done","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8e0e1c09080715d2248f985d2b1fb253766a91b9","unresolved":true,"context_lines":[{"line_number":189,"context_line":":doc:`/contributor/internals/retries`"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"This is also related to the previous section. The neutron-lib library provides"},{"line_number":192,"context_line":"a decorator called `retry_if_session_inactive` that could be used to retry"},{"line_number":193,"context_line":"any method if the context session is not active; in other words, there is no"},{"line_number":194,"context_line":"active transaction when the method is called. The session is retrieved from"},{"line_number":195,"context_line":"the \"context\" parameter passed into the method (it is a must to have this"}],"source_content_type":"text/x-rst","patch_set":3,"id":"ace865aa_7d3eec24","line":192,"range":{"start_line":192,"start_character":52,"end_line":192,"end_character":57},"updated":"2022-06-03 15:34:49.000000000","message":"s/can","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e2f0f193ba374b7dc50d77a7b815bc66e212896b","unresolved":false,"context_lines":[{"line_number":189,"context_line":":doc:`/contributor/internals/retries`"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"This is also related to the previous section. The neutron-lib library provides"},{"line_number":192,"context_line":"a decorator called `retry_if_session_inactive` that could be used to retry"},{"line_number":193,"context_line":"any method if the context session is not active; in other words, there is no"},{"line_number":194,"context_line":"active transaction when the method is called. The session is retrieved from"},{"line_number":195,"context_line":"the \"context\" parameter passed into the method (it is a must to have this"}],"source_content_type":"text/x-rst","patch_set":3,"id":"2175a1b9_89967ee5","line":192,"range":{"start_line":192,"start_character":52,"end_line":192,"end_character":57},"in_reply_to":"ace865aa_7d3eec24","updated":"2022-06-06 11:51:21.000000000","message":"Done","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"8e0e1c09080715d2248f985d2b1fb253766a91b9","unresolved":true,"context_lines":[{"line_number":199,"context_line":"retry decorator must be declared before the context one. If we first declare"},{"line_number":200,"context_line":"the database context (writer or reader) and then the retry decorator, the retry"},{"line_number":201,"context_line":"context would be always called from inside an active transaction making it"},{"line_number":202,"context_line":"useless. An example of good implementation (first the retry decorator and then"},{"line_number":203,"context_line":"the reader one):"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":3,"id":"383005a2_a70aedd8","line":202,"range":{"start_line":202,"start_character":20,"end_line":202,"end_character":22},"updated":"2022-06-03 15:34:49.000000000","message":"s/of a","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"e2f0f193ba374b7dc50d77a7b815bc66e212896b","unresolved":false,"context_lines":[{"line_number":199,"context_line":"retry decorator must be declared before the context one. If we first declare"},{"line_number":200,"context_line":"the database context (writer or reader) and then the retry decorator, the retry"},{"line_number":201,"context_line":"context would be always called from inside an active transaction making it"},{"line_number":202,"context_line":"useless. An example of good implementation (first the retry decorator and then"},{"line_number":203,"context_line":"the reader one):"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":".. code-block:: python"}],"source_content_type":"text/x-rst","patch_set":3,"id":"4e52b021_def64aa3","line":202,"range":{"start_line":202,"start_character":20,"end_line":202,"end_character":22},"in_reply_to":"383005a2_a70aedd8","updated":"2022-06-06 11:51:21.000000000","message":"Done","commit_id":"7533f062cacf74945decb3cd92527cd15af633bb"}]}
