)]}'
{"specs/newton/approved/cells-aggregate-api-db.rst":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"a656a9cff36f38f77a3f9198b475d55b546c04fe","unresolved":false,"context_lines":[{"line_number":82,"context_line":"``AggregateList.get_all`` method would need less modification. However this does"},{"line_number":83,"context_line":"not seem conceptually consistent with sharding the database based on cells."},{"line_number":84,"context_line":"The size of this table will grow with the total number of hosts across all"},{"line_number":85,"context_line":"cells."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"Data model impact"},{"line_number":88,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa0719c6_13f91481","line":85,"updated":"2016-03-21 19:53:22.000000000","message":"I am in favor of going with this alternative. It doesn\u0027t necessarily grow with the total number of hosts, it grows with the number of hosts within aggregates. Practically that may encompass all hosts though. It is however a tiny table with 3 rows, two of which are ints.\n\nMy perspective is that the hosts belonging to an aggregate is not a self contained property of the cell, it is scheduling metadata about the hosts.\n\nThe simple test I use to help determine if something belongs in a cell vs global is this: If the cell was detached and the compute/conductor APIs became a cell API would this have meaning? I can\u0027t see that aggregate_hosts has any use in the cell in that case.","commit_id":"87b63b8d27ec66489ec8af3fa7072f5ffb6f0cca"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"e12e8adc6eb970fa8d44ab9b1b3205577f5158d6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"``AggregateList.get_all`` method would need less modification. However this does"},{"line_number":83,"context_line":"not seem conceptually consistent with sharding the database based on cells."},{"line_number":84,"context_line":"The size of this table will grow with the total number of hosts across all"},{"line_number":85,"context_line":"cells."},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"Data model impact"},{"line_number":88,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa0719c6_f3510064","line":85,"in_reply_to":"fa0719c6_13f91481","updated":"2016-03-21 19:55:00.000000000","message":"Thats a good way to think about it in this case. It isn\u0027t generally USED within a cell, its used for scheduling. I will go with the alternative for now.","commit_id":"87b63b8d27ec66489ec8af3fa7072f5ffb6f0cca"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"efa0319d5b1e754410d08bbdd1d6236d7e191bf2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"                            \u0027AggregateMetadata.deleted \u003d\u003d 0,\u0027"},{"line_number":122,"context_line":"                            \u0027Aggregate.deleted \u003d\u003d 0)\u0027)"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"As use of soft-delete is deprecated the soft-delete mixin will not be applied"},{"line_number":125,"context_line":"to these schemas. Otherwise they are the same as currently found in the"},{"line_number":126,"context_line":"nova database, excluding properties that link to the ``aggregate_hosts`` table."},{"line_number":127,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"fa0719c6_fd90bc97","line":124,"updated":"2016-03-21 15:31:00.000000000","message":"\\o/","commit_id":"87b63b8d27ec66489ec8af3fa7072f5ffb6f0cca"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b91799422b652eb4dea46606898d8616d1627bb9","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        __tablename__ \u003d \u0027aggregates\u0027"},{"line_number":128,"context_line":"        __table_args__ \u003d (Index(\u0027aggregate_uuid_idx\u0027, \u0027uuid\u0027),)"},{"line_number":129,"context_line":"        id \u003d Column(Integer, primary_key\u003dTrue, autoincrement\u003dTrue)"},{"line_number":130,"context_line":"        uuid \u003d Column(String(36))"},{"line_number":131,"context_line":"        name \u003d Column(String(255))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        _hosts \u003d orm.relationship(AggregateHost,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a18252c_f2425c3d","line":130,"updated":"2016-04-13 17:56:52.000000000","message":"This should be unique, no? We don\u0027t have it now because it was added to existing data, but I think we should be good here. Also, I think it defaults to nullable\u003dTrue, but we don\u0027t want this to be nullable going forward, I think.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"82574759c7b459a5ffd33208448e20894e118a05","unresolved":false,"context_lines":[{"line_number":127,"context_line":"        __tablename__ \u003d \u0027aggregates\u0027"},{"line_number":128,"context_line":"        __table_args__ \u003d (Index(\u0027aggregate_uuid_idx\u0027, \u0027uuid\u0027),)"},{"line_number":129,"context_line":"        id \u003d Column(Integer, primary_key\u003dTrue, autoincrement\u003dTrue)"},{"line_number":130,"context_line":"        uuid \u003d Column(String(36))"},{"line_number":131,"context_line":"        name \u003d Column(String(255))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        _hosts \u003d orm.relationship(AggregateHost,"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a122d0e_3db358eb","line":130,"in_reply_to":"5a18252c_f2425c3d","updated":"2016-05-02 14:21:28.000000000","message":"Ok, Will make changes to wip patches and spec. Yeah, shouldn\u0027t be nullable now we enforce it in the code.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b91799422b652eb4dea46606898d8616d1627bb9","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        uuid \u003d Column(String(36))"},{"line_number":131,"context_line":"        name \u003d Column(String(255))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        _hosts \u003d orm.relationship(AggregateHost,"},{"line_number":134,"context_line":"                              primaryjoin\u003d\u0027and_(\u0027"},{"line_number":135,"context_line":"                              \u0027Aggregate.id \u003d\u003d AggregateHost.aggregate_id,\u0027"},{"line_number":136,"context_line":"                              \u0027AggregateHost.deleted \u003d\u003d 0,\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a18252c_72276cb6","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":14},"updated":"2016-04-13 17:56:52.000000000","message":"I think I said this in the code review, but I think we should not name the tables like this.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"82574759c7b459a5ffd33208448e20894e118a05","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        uuid \u003d Column(String(36))"},{"line_number":131,"context_line":"        name \u003d Column(String(255))"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        _hosts \u003d orm.relationship(AggregateHost,"},{"line_number":134,"context_line":"                              primaryjoin\u003d\u0027and_(\u0027"},{"line_number":135,"context_line":"                              \u0027Aggregate.id \u003d\u003d AggregateHost.aggregate_id,\u0027"},{"line_number":136,"context_line":"                              \u0027AggregateHost.deleted \u003d\u003d 0,\u0027"}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a122d0e_1ddbfc22","line":133,"range":{"start_line":133,"start_character":8,"end_line":133,"end_character":14},"in_reply_to":"5a18252c_72276cb6","updated":"2016-05-02 14:21:28.000000000","message":"Will rename in the spec. Will also work to sort this out in wip code.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b91799422b652eb4dea46606898d8616d1627bb9","unresolved":false,"context_lines":[{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"* Functional testing will not be modified. There should be no external impact"},{"line_number":229,"context_line":"  of these changes."},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"* New test fixtures will be provided that set up multiple cell databases and"},{"line_number":232,"context_line":"  cell mappings."}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a18252c_52d4f045","line":229,"updated":"2016-04-13 17:56:52.000000000","message":"Is functional testing currently sufficiently comprehensive for this?\n\nAlso, I think you need functional tests for the migration scenarios, no?","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"82574759c7b459a5ffd33208448e20894e118a05","unresolved":false,"context_lines":[{"line_number":226,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"* Functional testing will not be modified. There should be no external impact"},{"line_number":229,"context_line":"  of these changes."},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"* New test fixtures will be provided that set up multiple cell databases and"},{"line_number":232,"context_line":"  cell mappings."}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a122d0e_9df6ec8e","line":229,"in_reply_to":"5a18252c_52d4f045","updated":"2016-05-02 14:21:28.000000000","message":"Yep, functional tests needed for migrations. Further functional tests also needed for the aggregate object itself. Not so much for this change, but as I found they were not complete at present.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b91799422b652eb4dea46606898d8616d1627bb9","unresolved":false,"context_lines":[{"line_number":244,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":".. [1] http://eavesdrop.openstack.org/meetings/nova_cells/2016/nova_cells.2016-03-02-17.00.log.html"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"History"},{"line_number":249,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5a18252c_f2737c7e","line":247,"updated":"2016-04-13 17:56:52.000000000","message":"You might also add links to the flavor stuff here, and maybe even comment above that you\u0027re following prior examples or something.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"82574759c7b459a5ffd33208448e20894e118a05","unresolved":false,"context_lines":[{"line_number":244,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":".. [1] http://eavesdrop.openstack.org/meetings/nova_cells/2016/nova_cells.2016-03-02-17.00.log.html"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"History"},{"line_number":249,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":250,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"1a122d0e_7df310a0","line":247,"in_reply_to":"5a18252c_f2737c7e","updated":"2016-05-02 14:21:28.000000000","message":"Will do.","commit_id":"442e283ac48654cf6bb7dd6ebfe1c830c0bfaa4d"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c701cedbc25342c8d0bbbecb407612f057154de4","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* aggregate_hosts"},{"line_number":41,"context_line":"* aggregate_metadata"},{"line_number":42,"context_line":"* aggregates"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"The following objects will be modified to interact with the API database"},{"line_number":45,"context_line":"tables::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_2302110a","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":12},"updated":"2016-05-02 21:57:05.000000000","message":"What are we going to do about resource_provider_aggregates? That table has an aggregate_id column (it\u0027s not a foreign key, but seems like it should be). I guess we don\u0027t even have an object for a resource_provider_aggregate yet, but the object would lookup the aggregate by that id and the Aggregate object would look in the API DB first, and if not there it would migrate it.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"d45dfc73abe679928be9a107bb98ef34db877486","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"* aggregate_hosts"},{"line_number":41,"context_line":"* aggregate_metadata"},{"line_number":42,"context_line":"* aggregates"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"The following objects will be modified to interact with the API database"},{"line_number":45,"context_line":"tables::"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_ee71cc0d","line":42,"range":{"start_line":42,"start_character":2,"end_line":42,"end_character":12},"in_reply_to":"1a122d0e_2302110a","updated":"2016-05-04 17:51:56.000000000","message":"resource_provider_aggregates are going to remain in the cell db. (If the resource providers do). The lack of a foreign key was intentional as the aggregate id won\u0027t be in the database. Violations will have to be handled in the code rather than database.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c701cedbc25342c8d0bbbecb407612f057154de4","unresolved":false,"context_lines":[{"line_number":47,"context_line":"* Aggregate"},{"line_number":48,"context_line":"* AggregateList"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Methods currently located in the database/api.py will be moved to the"},{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_031c3569","line":50,"range":{"start_line":50,"start_character":33,"end_line":50,"end_character":41},"updated":"2016-05-02 21:57:05.000000000","message":"nova/db/sqlalchemy/api.py?\n\nThat would be more clear but I get what you\u0027re saying.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":47,"context_line":"* Aggregate"},{"line_number":48,"context_line":"* AggregateList"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Methods currently located in the database/api.py will be moved to the"},{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_50b5ffcd","line":50,"range":{"start_line":50,"start_character":33,"end_line":50,"end_character":41},"in_reply_to":"1a122d0e_031c3569","updated":"2016-05-04 17:21:25.000000000","message":"Will correct.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c701cedbc25342c8d0bbbecb407612f057154de4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database. The object methods"},{"line_number":55,"context_line":"will also be modified to perform live data migration from the older database."},{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_632369a8","line":55,"range":{"start_line":55,"start_character":62,"end_line":55,"end_character":67},"updated":"2016-05-02 21:57:05.000000000","message":"nit: older (cell) database","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database. The object methods"},{"line_number":55,"context_line":"will also be modified to perform live data migration from the older database."},{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_d0c90f5c","line":55,"range":{"start_line":55,"start_character":62,"end_line":55,"end_character":67},"in_reply_to":"1a122d0e_632369a8","updated":"2016-05-04 17:21:25.000000000","message":"Yep. Have to make sure we use the right nomenclature from here on in.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c701cedbc25342c8d0bbbecb407612f057154de4","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database. The object methods"},{"line_number":55,"context_line":"will also be modified to perform live data migration from the older database."},{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The ``Flavor`` tables have already been migrated to the API db. In general"},{"line_number":60,"context_line":"the proposed changes will follow those methods. [2]_"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_837a0576","line":57,"range":{"start_line":56,"start_character":73,"end_line":57,"end_character":75},"updated":"2016-05-02 21:57:05.000000000","message":"We don\u0027t actually do this for the Flavor object, we get the flavor from the API or cell db and then delete it. We have the separate online data migration command to migrate the flavors from the cell db to the api db if they aren\u0027t already there yet.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database. The object methods"},{"line_number":55,"context_line":"will also be modified to perform live data migration from the older database."},{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The ``Flavor`` tables have already been migrated to the API db. In general"},{"line_number":60,"context_line":"the proposed changes will follow those methods. [2]_"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_50033f76","line":57,"range":{"start_line":56,"start_character":73,"end_line":57,"end_character":75},"in_reply_to":"1a122d0e_837a0576","updated":"2016-05-04 17:21:25.000000000","message":"In general I realized while writing the Keypairs spec that there was still a-lot of the \u0027old\u0027 way documented here. Will update to clean that out.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The ``Flavor`` tables have already been migrated to the API db. In general"},{"line_number":60,"context_line":"the proposed changes will follow those methods. [2]_"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_03f0b5c8","line":60,"range":{"start_line":59,"start_character":64,"end_line":60,"end_character":52},"updated":"2016-05-02 22:05:33.000000000","message":"Except the flavor object doesn\u0027t do the online data migration when pulling a flavor from the cell db, or when saving it.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":56,"context_line":"This means that any data not found in the API database will be migrated. The"},{"line_number":57,"context_line":"``destroy`` method will remove aggregates from both databases if it exists."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"The ``Flavor`` tables have already been migrated to the API db. In general"},{"line_number":60,"context_line":"the proposed changes will follow those methods. [2]_"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"Alternatives"},{"line_number":63,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_30068385","line":60,"range":{"start_line":59,"start_character":64,"end_line":60,"end_character":52},"in_reply_to":"1a122d0e_03f0b5c8","updated":"2016-05-04 17:21:25.000000000","message":"See above.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        \"\"\"Represents a metadata key/value pair for an aggregate.\"\"\""},{"line_number":114,"context_line":"        __tablename__ \u003d \u0027aggregate_metadata\u0027"},{"line_number":115,"context_line":"        __table_args__ \u003d ("},{"line_number":116,"context_line":"            schema.UniqueConstraint(\"aggregate_id\", \"key\","},{"line_number":117,"context_line":"                name\u003d\"uniq_aggregate_metadata0aggregate_id0key\""},{"line_number":118,"context_line":"                ),"},{"line_number":119,"context_line":"            Index(\u0027aggregate_metadata_key_idx\u0027, \u0027key\u0027),"},{"line_number":120,"context_line":"        )"},{"line_number":121,"context_line":"        id \u003d Column(Integer, primary_key\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_83a96593","line":118,"range":{"start_line":116,"start_character":12,"end_line":118,"end_character":18},"updated":"2016-05-02 22:05:33.000000000","message":"Shouldn\u0027t value also be in the unique constraint? I feel like this was brought up once before and we had to dig into the code to see that this was being handled in the DB API code rather than using constraints in the schema. And we could add it in the cell db schema but the migration would have to check for duplicates and handle those. But when adding the new schema, we should just do it right from the start.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        \"\"\"Represents a metadata key/value pair for an aggregate.\"\"\""},{"line_number":114,"context_line":"        __tablename__ \u003d \u0027aggregate_metadata\u0027"},{"line_number":115,"context_line":"        __table_args__ \u003d ("},{"line_number":116,"context_line":"            schema.UniqueConstraint(\"aggregate_id\", \"key\","},{"line_number":117,"context_line":"                name\u003d\"uniq_aggregate_metadata0aggregate_id0key\""},{"line_number":118,"context_line":"                ),"},{"line_number":119,"context_line":"            Index(\u0027aggregate_metadata_key_idx\u0027, \u0027key\u0027),"},{"line_number":120,"context_line":"        )"},{"line_number":121,"context_line":"        id \u003d Column(Integer, primary_key\u003dTrue)"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_d0af4f29","line":118,"range":{"start_line":116,"start_character":12,"end_line":118,"end_character":18},"in_reply_to":"1a122d0e_83a96593","updated":"2016-05-04 17:21:25.000000000","message":"Why should value be in the schema? I thought that a multi column unique constraint enforced uniqueness of the column tuple (id, key, value). If we add the \u0027value\u0027 column to the unique constraint won\u0027t that mean that we could have keys with multiple values?","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        __tablename__ \u003d \u0027aggregates\u0027"},{"line_number":130,"context_line":"        __table_args__ \u003d ("},{"line_number":131,"context_line":"            Index(\u0027aggregate_uuid_idx\u0027, \u0027uuid\u0027),"},{"line_number":132,"context_line":"            schema.UniqueConstraint(\"aggregate_uuid\","},{"line_number":133,"context_line":"                name\u003d\"uniq_aggregate0aggregate_uuid\""},{"line_number":134,"context_line":"                ),"},{"line_number":135,"context_line":"        )"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_c37a3d25","line":132,"range":{"start_line":132,"start_character":37,"end_line":132,"end_character":51},"updated":"2016-05-02 22:05:33.000000000","message":"I think this is just \u0027uuid\u0027.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        __tablename__ \u003d \u0027aggregates\u0027"},{"line_number":130,"context_line":"        __table_args__ \u003d ("},{"line_number":131,"context_line":"            Index(\u0027aggregate_uuid_idx\u0027, \u0027uuid\u0027),"},{"line_number":132,"context_line":"            schema.UniqueConstraint(\"aggregate_uuid\","},{"line_number":133,"context_line":"                name\u003d\"uniq_aggregate0aggregate_uuid\""},{"line_number":134,"context_line":"                ),"},{"line_number":135,"context_line":"        )"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_d33919da","line":132,"range":{"start_line":132,"start_character":37,"end_line":132,"end_character":51},"in_reply_to":"1a122d0e_c37a3d25","updated":"2016-05-04 17:21:25.000000000","message":"Yeah, I think you are right. Better check the code too.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        hosts \u003d orm.relationship(AggregateHost,"},{"line_number":141,"context_line":"                              primaryjoin\u003d\u0027and_(\u0027"},{"line_number":142,"context_line":"                              \u0027Aggregate.id \u003d\u003d AggregateHost.aggregate_id,\u0027"},{"line_number":143,"context_line":"                              \u0027AggregateHost.deleted \u003d\u003d 0,\u0027"},{"line_number":144,"context_line":"                              \u0027Aggregate.deleted \u003d\u003d 0)\u0027)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        metadata \u003d orm.relationship(AggregateMetadata,"},{"line_number":147,"context_line":"                            primaryjoin\u003d\u0027and_(\u0027"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_8397a539","line":144,"range":{"start_line":143,"start_character":30,"end_line":144,"end_character":56},"updated":"2016-05-02 22:05:33.000000000","message":"The deleted column suggest these will be soft deletable, but they won\u0027t be right?","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        hosts \u003d orm.relationship(AggregateHost,"},{"line_number":141,"context_line":"                              primaryjoin\u003d\u0027and_(\u0027"},{"line_number":142,"context_line":"                              \u0027Aggregate.id \u003d\u003d AggregateHost.aggregate_id,\u0027"},{"line_number":143,"context_line":"                              \u0027AggregateHost.deleted \u003d\u003d 0,\u0027"},{"line_number":144,"context_line":"                              \u0027Aggregate.deleted \u003d\u003d 0)\u0027)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        metadata \u003d orm.relationship(AggregateMetadata,"},{"line_number":147,"context_line":"                            primaryjoin\u003d\u0027and_(\u0027"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_73592535","line":144,"range":{"start_line":143,"start_character":30,"end_line":144,"end_character":56},"in_reply_to":"1a122d0e_8397a539","updated":"2016-05-04 17:21:25.000000000","message":"Will update, this is not present in the poc code.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        metadata \u003d orm.relationship(AggregateMetadata,"},{"line_number":147,"context_line":"                            primaryjoin\u003d\u0027and_(\u0027"},{"line_number":148,"context_line":"                            \u0027Aggregate.id \u003d\u003d AggregateMetadata.aggregate_id,\u0027"},{"line_number":149,"context_line":"                            \u0027AggregateMetadata.deleted \u003d\u003d 0,\u0027"},{"line_number":150,"context_line":"                            \u0027Aggregate.deleted \u003d\u003d 0)\u0027)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"As use of soft-delete is deprecated the soft-delete mixin will not be applied"},{"line_number":153,"context_line":"to these schemas. Otherwise they are the same as currently found in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_e3a8197a","line":150,"range":{"start_line":149,"start_character":28,"end_line":150,"end_character":54},"updated":"2016-05-02 22:05:33.000000000","message":"ditto","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        metadata \u003d orm.relationship(AggregateMetadata,"},{"line_number":147,"context_line":"                            primaryjoin\u003d\u0027and_(\u0027"},{"line_number":148,"context_line":"                            \u0027Aggregate.id \u003d\u003d AggregateMetadata.aggregate_id,\u0027"},{"line_number":149,"context_line":"                            \u0027AggregateMetadata.deleted \u003d\u003d 0,\u0027"},{"line_number":150,"context_line":"                            \u0027Aggregate.deleted \u003d\u003d 0)\u0027)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"As use of soft-delete is deprecated the soft-delete mixin will not be applied"},{"line_number":153,"context_line":"to these schemas. Otherwise they are the same as currently found in the"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_b33bbdc7","line":150,"range":{"start_line":149,"start_character":28,"end_line":150,"end_character":54},"in_reply_to":"1a122d0e_e3a8197a","updated":"2016-05-04 17:21:25.000000000","message":"Will update. Corrected in POC code.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":185,"context_line":"it is also worth considering whether this design meets those demands. As the"},{"line_number":186,"context_line":"number of hosts grows the ``aggregate_hosts`` table will grow with them."},{"line_number":187,"context_line":"However we believe that this is manageable as the row size for this table"},{"line_number":188,"context_line":"is very small. Even in extremely large deployments indexed queries over hosts"},{"line_number":189,"context_line":"in this table should be capable of being performant."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Other deployer impact"},{"line_number":192,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_c3c87d59","line":189,"range":{"start_line":188,"start_character":51,"end_line":189,"end_character":13},"updated":"2016-05-02 22:05:33.000000000","message":"There isn\u0027t an index defined in the schema you have above. Maybe that\u0027s assumed to be covered by the unique constraint? We should probably be explicit about the index in the schema.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":185,"context_line":"it is also worth considering whether this design meets those demands. As the"},{"line_number":186,"context_line":"number of hosts grows the ``aggregate_hosts`` table will grow with them."},{"line_number":187,"context_line":"However we believe that this is manageable as the row size for this table"},{"line_number":188,"context_line":"is very small. Even in extremely large deployments indexed queries over hosts"},{"line_number":189,"context_line":"in this table should be capable of being performant."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"Other deployer impact"},{"line_number":192,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_737005a5","line":189,"range":{"start_line":188,"start_character":51,"end_line":189,"end_character":13},"in_reply_to":"1a122d0e_c3c87d59","updated":"2016-05-04 17:21:25.000000000","message":"The index is covered by the unique constraint. Will add a note about this.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":215,"context_line":"Work Items"},{"line_number":216,"context_line":"----------"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"* Create the ``aggregate`` and ``aggregate_metadata`` database models in the"},{"line_number":219,"context_line":"  api database."},{"line_number":220,"context_line":"* Database schema update and migration to remove foreign key link in"},{"line_number":221,"context_line":"  the ``aggregate_hosts`` table to the aggregate id."}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_63ea49ae","line":218,"updated":"2016-05-02 22:05:33.000000000","message":"And aggregate_hosts?","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":215,"context_line":"Work Items"},{"line_number":216,"context_line":"----------"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"* Create the ``aggregate`` and ``aggregate_metadata`` database models in the"},{"line_number":219,"context_line":"  api database."},{"line_number":220,"context_line":"* Database schema update and migration to remove foreign key link in"},{"line_number":221,"context_line":"  the ``aggregate_hosts`` table to the aggregate id."}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_136271d8","line":218,"in_reply_to":"1a122d0e_63ea49ae","updated":"2016-05-04 17:21:25.000000000","message":"Yep.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7b270c01186612b4f57a11369b8e5f557daf9d2c","unresolved":false,"context_lines":[{"line_number":219,"context_line":"  api database."},{"line_number":220,"context_line":"* Database schema update and migration to remove foreign key link in"},{"line_number":221,"context_line":"  the ``aggregate_hosts`` table to the aggregate id."},{"line_number":222,"context_line":"* Create a nova-manage command to perform offline data migration."},{"line_number":223,"context_line":"* Create new test fixtures that simulate multiple cell databases."},{"line_number":224,"context_line":"* Modify the Aggregate and AggregateList objects to use the new database"},{"line_number":225,"context_line":"  and perform online data migration."}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_e3d659f0","line":222,"range":{"start_line":222,"start_character":42,"end_line":222,"end_character":49},"updated":"2016-05-02 22:05:33.000000000","message":"It wouldn\u0027t actually be offline, right?","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"282d687fca8d480e83a76910ac70d5b9794955cd","unresolved":false,"context_lines":[{"line_number":219,"context_line":"  api database."},{"line_number":220,"context_line":"* Database schema update and migration to remove foreign key link in"},{"line_number":221,"context_line":"  the ``aggregate_hosts`` table to the aggregate id."},{"line_number":222,"context_line":"* Create a nova-manage command to perform offline data migration."},{"line_number":223,"context_line":"* Create new test fixtures that simulate multiple cell databases."},{"line_number":224,"context_line":"* Modify the Aggregate and AggregateList objects to use the new database"},{"line_number":225,"context_line":"  and perform online data migration."}],"source_content_type":"text/x-rst","patch_set":6,"id":"1a122d0e_f35c151b","line":222,"range":{"start_line":222,"start_character":42,"end_line":222,"end_character":49},"in_reply_to":"1a122d0e_e3d659f0","updated":"2016-05-04 17:21:25.000000000","message":"Its online, correct.","commit_id":"c8aabc174ee3db49cd44425403603b07481691b9"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"1edec50b4ada672ed6e17e4bba64515876be3be3","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Aggregates may be applied to compute nodes in multiple cells and are a global"},{"line_number":21,"context_line":"concept. Aggregates can also be added to resource pools and must be available"},{"line_number":22,"context_line":"in all cells."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Currently aggregates are stored in the cell database but to keep their global"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_99de913d","line":21,"range":{"start_line":21,"start_character":9,"end_line":21,"end_character":55},"updated":"2016-05-09 20:38:17.000000000","message":"I thought it was the other way around. Doesn\u0027t matter much for this spec, but for my own edification I\u0027m curious about this.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"12870bac88056c5517a5b0a23c93a34138742d28","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Aggregates may be applied to compute nodes in multiple cells and are a global"},{"line_number":21,"context_line":"concept. Aggregates can also be added to resource pools and must be available"},{"line_number":22,"context_line":"in all cells."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Currently aggregates are stored in the cell database but to keep their global"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_af575156","line":21,"range":{"start_line":21,"start_character":9,"end_line":21,"end_character":55},"in_reply_to":"dab17558_99de913d","updated":"2016-05-11 16:58:16.000000000","message":"Will check up on this and modify if neccessary.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aa6743ddebd4e8e05f355c9cc85b014159383443","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"Methods currently located in the db/sqlachemy/api.py will be moved to the"},{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database concurrently with"},{"line_number":55,"context_line":"the cell database. Migration methods will be added that will migrate"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_587d48e6","line":52,"updated":"2016-05-09 18:54:02.000000000","message":"++","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f917bfa029dc3ad9dcfd4f22c5081bec3a2c2355","unresolved":false,"context_lines":[{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database concurrently with"},{"line_number":55,"context_line":"the cell database. Migration methods will be added that will migrate"},{"line_number":56,"context_line":"aggregates from the cell to API database. These methods will be added to"},{"line_number":57,"context_line":"the nova manage ``online_data_migrations`` command."}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_11e3b606","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":70},"updated":"2016-05-09 09:16:53.000000000","message":"Do we actually mean that here.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aa6743ddebd4e8e05f355c9cc85b014159383443","unresolved":false,"context_lines":[{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database concurrently with"},{"line_number":55,"context_line":"the cell database. Migration methods will be added that will migrate"},{"line_number":56,"context_line":"aggregates from the cell to API database. These methods will be added to"},{"line_number":57,"context_line":"the nova manage ``online_data_migrations`` command."}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_b88434d4","line":54,"updated":"2016-05-09 18:54:02.000000000","message":"Yes. It\u0027s worded a little oddly, but I understand what Mark\u0027s getting at here. Basically, the code added to the Aggregate and AggregateList objects will first look in the API database and fall back to the child database, migrating the data online if found in the child database. Mark, instead of using the word \"concurrently\", perhaps use the term \"fallback and online migrate\"?","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":18247,"name":"Mark Doffman","email":"mdoffman@linux.vnet.ibm.com","username":"doffm"},"change_message_id":"12870bac88056c5517a5b0a23c93a34138742d28","unresolved":false,"context_lines":[{"line_number":51,"context_line":"``Aggregate`` and ``AggregateList`` objects. This is following the established"},{"line_number":52,"context_line":"pattern that there will be no single \u0027api\u0027 file for api database methods."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"These methods will be modified to access the API database concurrently with"},{"line_number":55,"context_line":"the cell database. Migration methods will be added that will migrate"},{"line_number":56,"context_line":"aggregates from the cell to API database. These methods will be added to"},{"line_number":57,"context_line":"the nova manage ``online_data_migrations`` command."}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_afde31da","line":54,"range":{"start_line":54,"start_character":58,"end_line":54,"end_character":70},"in_reply_to":"dab17558_11e3b606","updated":"2016-05-11 16:58:16.000000000","message":"No, we don\u0027t. At least this doesn\u0027t properly represent what will happen. Its more of a fallback case.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aa6743ddebd4e8e05f355c9cc85b014159383443","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"These methods are accessed by the api service and the conductor. As they take"},{"line_number":78,"context_line":"a host argument, it should be trivial to decide upon a cell for these"},{"line_number":79,"context_line":"functions to operate on by looking up the cell from the host."},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"The ``AggregateList.get_all`` method accesses the ``aggregate_hosts`` table."},{"line_number":82,"context_line":"It will need to be modified to look at the ``aggregate_host`` values obtained"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_9887b0d6","line":79,"updated":"2016-05-09 18:54:02.000000000","message":"s/from the host/for the host in the API database\u0027s mapping table/ ?","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"f917bfa029dc3ad9dcfd4f22c5081bec3a2c2355","unresolved":false,"context_lines":[{"line_number":86,"context_line":"``AggregateList.get_all`` method will now have to perform a database query"},{"line_number":87,"context_line":"per cell to obtain the aggregate host mapping information. Currently this"},{"line_number":88,"context_line":"method is called within the scheduler to initialise or re-populate the"},{"line_number":89,"context_line":"HostState objects."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"Data model impact"},{"line_number":92,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_d1b76ef3","line":89,"updated":"2016-05-09 09:16:53.000000000","message":"yeah, its messy, and its a tiny table anyway. Thats good push back. I am sold.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"1edec50b4ada672ed6e17e4bba64515876be3be3","unresolved":false,"context_lines":[{"line_number":184,"context_line":"is very small. Even in extremely large deployments indexed queries over hosts"},{"line_number":185,"context_line":"in this table should be capable of being performant. Through the unique"},{"line_number":186,"context_line":"constraint the table will maintain an index over all the columns queried on"},{"line_number":187,"context_line":"for aggregate hosts."},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"Other deployer impact"},{"line_number":190,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_f99b5d70","line":187,"updated":"2016-05-09 20:38:17.000000000","message":"These should also eventually be split out with the other scheduling related tables. Aggregates only have use in the context of scheduling so I don\u0027t see a reason for them to remain if/when a split does occur.","commit_id":"1575c3149662b501c73c999ada67e977c4f7e2d5"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aeae6c72fd0422a3d2275961f93187742af5ca43","unresolved":false,"context_lines":[{"line_number":107,"context_line":"        id \u003d Column(Integer, primary_key\u003dTrue, autoincrement\u003dTrue)"},{"line_number":108,"context_line":"        host \u003d Column(String(255))"},{"line_number":109,"context_line":"        aggregate_id \u003d Column(Integer, ForeignKey(\u0027aggregates.id\u0027),"},{"line_number":110,"context_line":"                              nullable\u003dFalse)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    class AggregateMetadata(API_BASE):"},{"line_number":113,"context_line":"        \"\"\"Represents a metadata key/value pair for an aggregate.\"\"\""}],"source_content_type":"text/x-rst","patch_set":8,"id":"dab17558_41f767f5","line":110,"updated":"2016-05-12 14:33:10.000000000","message":"Please note that you will want an Index on aggregate_id. The index that will automatically be added for the (host, aggregate_id) unique constraint will not be able to be used for predicates that only filter on aggregate_id.","commit_id":"754d28c439c22be82b6265e5c139c20a4b5d5d61"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"aeae6c72fd0422a3d2275961f93187742af5ca43","unresolved":false,"context_lines":[{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        hosts \u003d orm.relationship(AggregateHost,"},{"line_number":141,"context_line":"                              primaryjoin\u003d("},{"line_number":142,"context_line":"                              \u0027Aggregate.id \u003d\u003d AggregateHost.aggregate_id\u0027)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        metadata \u003d orm.relationship(AggregateMetadata,"},{"line_number":145,"context_line":"                            primaryjoin\u003d("}],"source_content_type":"text/x-rst","patch_set":8,"id":"dab17558_a1dc5375","line":142,"updated":"2016-05-12 14:33:10.000000000","message":"Without the above-mentioned index on aggregate_id only, this join will result in a full table scan of the entire aggregate_hosts table every time it is accessed.","commit_id":"754d28c439c22be82b6265e5c139c20a4b5d5d61"}]}
