)]}'
{"specs/liberty/approved/cells-db-connection-switching.rst":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9353a105f59abd58a6bfcea5e053c96ad07e85ff","unresolved":false,"context_lines":[{"line_number":58,"context_line":"Data model impact"},{"line_number":59,"context_line":"-----------------"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"None"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa32b979_7673c64e","line":61,"updated":"2015-06-24 12:36:29.000000000","message":"Can we have details about this new field introduced ? What will be the data it will handle","commit_id":"22037024281c93eac36d395078b495121b3962ce"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e8622d1b52f91ec3ceb8650253a4760382415f69","unresolved":false,"context_lines":[{"line_number":58,"context_line":"Data model impact"},{"line_number":59,"context_line":"-----------------"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"None"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa32b979_c218a920","line":61,"in_reply_to":"fa32b979_7673c64e","updated":"2015-06-25 02:49:33.000000000","message":"I thought this section is for changes to a database model. The RequestContext isn\u0027t stored in the database, so I thought to leave this blank. I added detail about the field to the \u0027Proposed change\" section.","commit_id":"22037024281c93eac36d395078b495121b3962ce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7809c339a37cc2b9ed213b37a366198ba887a794","unresolved":false,"context_lines":[{"line_number":58,"context_line":"Data model impact"},{"line_number":59,"context_line":"-----------------"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"None"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"REST API impact"},{"line_number":64,"context_line":"---------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba3cc151_1cdde26e","line":61,"in_reply_to":"fa32b979_c218a920","updated":"2015-07-01 15:01:26.000000000","message":"+1 to mel\u0027s point here.","commit_id":"22037024281c93eac36d395078b495121b3962ce"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e61c197fb1c413050b11e9f3e303a0514f1c1b9c","unresolved":false,"context_lines":[{"line_number":22,"context_line":"directly with the database and message queue of the cell for an instance."},{"line_number":23,"context_line":"Instance -\u003e cell mappings are stored in a table in the API level database."},{"line_number":24,"context_line":"Each InstanceMapping refers to a CellMapping, and the CellMapping contains"},{"line_number":25,"context_line":"the connection information for the cell. We need a way to communicate this"},{"line_number":26,"context_line":"to the DB API layer."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_5c012a69","line":25,"range":{"start_line":25,"start_character":70,"end_line":25,"end_character":74},"updated":"2015-07-01 17:00:20.000000000","message":"I think it would be good to define \"this\" although I think I get what you mean.\n\nThe object will have an associated context, and that context includes a pointer to which DB is being accessed.\n\nThe DB connection string could be the API DB, or one of the cell DBs I guess?","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f6f9b45d05ad3799cdc563369c1f64062c9bf61a","unresolved":false,"context_lines":[{"line_number":22,"context_line":"directly with the database and message queue of the cell for an instance."},{"line_number":23,"context_line":"Instance -\u003e cell mappings are stored in a table in the API level database."},{"line_number":24,"context_line":"Each InstanceMapping refers to a CellMapping, and the CellMapping contains"},{"line_number":25,"context_line":"the connection information for the cell. We need a way to communicate this"},{"line_number":26,"context_line":"to the DB API layer."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_72b20496","line":25,"range":{"start_line":25,"start_character":70,"end_line":25,"end_character":74},"in_reply_to":"ba3cc151_5c012a69","updated":"2015-07-01 21:43:32.000000000","message":"Yep.  \"this\" is some indicator of which database to talk to, or which sqlalchemy engine/session to work with.","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f6f9b45d05ad3799cdc563369c1f64062c9bf61a","unresolved":false,"context_lines":[{"line_number":43,"context_line":"We propose to store the database connection information for a cell in the"},{"line_number":44,"context_line":"RequestContext where it can be used by the DB API layer to interact with"},{"line_number":45,"context_line":"the cell database. The field \u0027db_connection\u0027 will store a database connection"},{"line_number":46,"context_line":"string, for example: \u0027mysql://nova:password@db.example.com:3306/nova\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_558b2a68","line":46,"updated":"2015-07-01 21:43:32.000000000","message":"Rather than storing a connection string it would be preferable to store a handle to a database engine/session.  If you check out http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py?id\u003de4e16e9077b5e78f809c6c634153fa62a5facb16#n171 there are currently two databases that can be used, and the caller has to explicitly choose to get a session/engine from one of them by method name.  I think what we\u0027ll want is some way to consolidate those into a single method to get an engine, or a method to get a session, with a parameter that determines which EngineFacade to use.  Then we just need to store a hashable reference that can be used.  So something like:\n\n    db/sqlalchemy/api.py:get_engine(db):\n        return facade[db].get_engine()\n\nignoring the lazy creation that occurs there for now.\n\nI\u0027m not sure what could be used for that yet, but it doesn\u0027t necessarily need to be a connection string.","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"82f71c42d8d297bb911d4ed817e30857213e04a6","unresolved":false,"context_lines":[{"line_number":43,"context_line":"We propose to store the database connection information for a cell in the"},{"line_number":44,"context_line":"RequestContext where it can be used by the DB API layer to interact with"},{"line_number":45,"context_line":"the cell database. The field \u0027db_connection\u0027 will store a database connection"},{"line_number":46,"context_line":"string, for example: \u0027mysql://nova:password@db.example.com:3306/nova\u0027"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"Alternatives"},{"line_number":49,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_5867cf4c","line":46,"in_reply_to":"ba3cc151_558b2a68","updated":"2015-07-02 09:02:34.000000000","message":"oh thats a good idea, I was trying to think of a nicer way, that thats it.","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"f6f9b45d05ad3799cdc563369c1f64062c9bf61a","unresolved":false,"context_lines":[{"line_number":69,"context_line":"Security impact"},{"line_number":70,"context_line":"---------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The database connection field in the RequestContext could contain sensitive"},{"line_number":73,"context_line":"data."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Notifications impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_35e54637","line":72,"updated":"2015-07-01 21:43:32.000000000","message":"This is why I would like to find a different thing to use here if possible.","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"82f71c42d8d297bb911d4ed817e30857213e04a6","unresolved":false,"context_lines":[{"line_number":69,"context_line":"Security impact"},{"line_number":70,"context_line":"---------------"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"The database connection field in the RequestContext could contain sensitive"},{"line_number":73,"context_line":"data."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"Notifications impact"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ba3cc151_f857c357","line":72,"in_reply_to":"ba3cc151_35e54637","updated":"2015-07-02 09:02:34.000000000","message":"top idea.","commit_id":"40fa6f1cd0361f7349edbc09447aad433ccf9732"}]}
