)]}'
{"specs/newton/approved/flavor-multi-sorting.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b432bdc9a5b41f6a8936cf22b6e5b09da06030ca","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will handle the multi sort keys and directions information passed by the API"},{"line_number":53,"context_line":"layer."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"To ensure the backwards compatibility, the legacy v2 API should be add the"},{"line_number":56,"context_line":"multiple sort keys and direction as well."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_f297fe8d","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":41},"updated":"2016-03-22 20:19:59.000000000","message":"Huh? Are you proposing that we add this support to the legacy v2.0 API? I don\u0027t see how that would be a backward compatible change.","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"will handle the multi sort keys and directions information passed by the API"},{"line_number":53,"context_line":"layer."},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"To ensure the backwards compatibility, the legacy v2 API should be add the"},{"line_number":56,"context_line":"multiple sort keys and direction as well."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Alternatives"},{"line_number":59,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_1d08ba90","line":56,"range":{"start_line":55,"start_character":0,"end_line":56,"end_character":41},"in_reply_to":"fa0719c6_f297fe8d","updated":"2016-03-24 12:47:20.000000000","message":"No, I\u0027ll remove it in the next version.","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b432bdc9a5b41f6a8936cf22b6e5b09da06030ca","unresolved":false,"context_lines":[{"line_number":62,"context_line":"\"sort_dir\" query parameters."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"For example:"},{"line_number":65,"context_line":"/flavors/detail?sort_key\u003dvcpus\u0026sort_dir\u003dasc\u0026sort_key\u003dmemory_mb\u0026sort_dir\u003dasc"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"To provide users with the ability to use the classic familiar syntax and"},{"line_number":68,"context_line":"to ensure a smoother transition to the new one, classic syntax should"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_b2274663","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":75},"updated":"2016-03-22 20:19:59.000000000","message":"How is this different from the example on L48?","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":62,"context_line":"\"sort_dir\" query parameters."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"For example:"},{"line_number":65,"context_line":"/flavors/detail?sort_key\u003dvcpus\u0026sort_dir\u003dasc\u0026sort_key\u003dmemory_mb\u0026sort_dir\u003dasc"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"To provide users with the ability to use the classic familiar syntax and"},{"line_number":68,"context_line":"to ensure a smoother transition to the new one, classic syntax should"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_aa080629","line":65,"range":{"start_line":65,"start_character":0,"end_line":65,"end_character":75},"in_reply_to":"fa0719c6_b2274663","updated":"2016-03-24 12:47:20.000000000","message":"I will fix this in the next version.\nFor example: /flavors?sort_key\u003dvcpus,memory_mb\u0026sort_dir\u003dasc,asc","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b432bdc9a5b41f6a8936cf22b6e5b09da06030ca","unresolved":false,"context_lines":[{"line_number":76,"context_line":"REST API impact"},{"line_number":77,"context_line":"---------------"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"The following existing GET APIs will support the new sorting parameters:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"* /v2.1/flavors"},{"line_number":82,"context_line":"* /v2.1/flavors/detail"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_12eef2eb","line":79,"updated":"2016-03-22 20:19:59.000000000","message":"Is there a new microversion proposed for this change?","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"REST API impact"},{"line_number":77,"context_line":"---------------"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"The following existing GET APIs will support the new sorting parameters:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"* /v2.1/flavors"},{"line_number":82,"context_line":"* /v2.1/flavors/detail"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_6fb5637c","line":79,"in_reply_to":"fa0719c6_12eef2eb","updated":"2016-03-24 12:47:20.000000000","message":"Yes, I think we should launch a new microversion.","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"672241737c2736b28bbd731c9fa157b1764057ae","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_be69288e","line":140,"updated":"2016-03-21 12:39:18.000000000","message":"What is the impact on our indexes here in terms of which queries will be fast and which slow when keys end up getting to be arbitrary.","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"259a51f9d48983bd27c071168f18cb799a221447","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_528cea34","line":140,"in_reply_to":"fa0719c6_324df66c","updated":"2016-03-22 20:22:01.000000000","message":"Another thing to keep in mind regarding performance is that most deployments probably have not that many flavors in the database, as opposed to other things like instances. At least that\u0027s kind of the assumption we\u0027ve been making with some of the flavor migration for the cells v2 work. Might be good to get alaski\u0027s thoughts on this though.","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_cfdf4fd4","line":140,"in_reply_to":"fa0719c6_324df66c","updated":"2016-03-24 12:47:20.000000000","message":"IIUC, the indexes about the \u0027flavorid\u0027, \u0027name\u0027 and \u0027deleted\u0027 will be created by force while the unique constrants created, although there is no index created explicitly:\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L395-L398","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_07bf6baa","line":140,"in_reply_to":"fa0719c6_528cea34","updated":"2016-03-24 12:47:20.000000000","message":"OK, thanks. I will think about it.\n\nBut the following words:\n\u003eMight be good to get alaski\u0027s thoughts on this though.\nDid you mean we should add a database migration as well?","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":16066,"name":"xiexs","email":"xiexs@cn.fujitsu.com","username":"simen"},"change_message_id":"b16d941c09dcd05ab0c964e43c684093c3aaaa0a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_2fca4b1b","line":140,"in_reply_to":"fa0719c6_be69288e","updated":"2016-03-24 12:47:20.000000000","message":"OK, Thanks. I\u0027ll add this part into this specs.\nBut actually the sort actions have only a quite small impact on the data queries i think, just like the conclusion posted by the following specs:\nhttps://specs.openstack.org/openstack/nova-specs/specs/kilo/implemented/nova-pagination.html","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c3813a428d22a4d5fabd526a7ce0ac79f1c4bd5f","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_cfacd337","line":140,"in_reply_to":"fa0719c6_be69288e","updated":"2016-03-22 20:01:53.000000000","message":"To be fair, we probably have the same problem with the instances table filtering. By default there is an order_by placed on the deleted and created_at columns which was causing performance problems because we didn\u0027t have an index on those columns in the instances table, added here:\n\nhttps://review.openstack.org/#/c/288765/\n\nRight now that method is only used by instance_get_all_by_filters_sort but if this spec is proposing to use that method too, or something similar, then yeah we have to consider an index for the default case.\n\nRight now we don\u0027t have any indexes on the instance_types table:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/models.py#L386","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b432bdc9a5b41f6a8936cf22b6e5b09da06030ca","unresolved":false,"context_lines":[{"line_number":137,"context_line":"Performance Impact"},{"line_number":138,"context_line":"------------------"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"None"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"Other deployer impact"},{"line_number":143,"context_line":"---------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"fa0719c6_324df66c","line":140,"in_reply_to":"fa0719c6_cfacd337","updated":"2016-03-22 20:19:59.000000000","message":"Oh I see we already default to sort by flavorid and id, we should probably have an index on those defaults:\n\nhttps://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/api.py#L5050","commit_id":"a1888d841735b8db2e63b25a69fc65be2594aa75"}]}
