)]}'
{"nova/objects/resource_provider.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f24e000ef2b0733295d3b3bb89f3539f98121fdd","unresolved":false,"context_lines":[{"line_number":672,"context_line":"    the resource provider in the same aggregate."},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"    :param required_traits: a list of traits"},{"line_number":675,"context_line":"    :param sharing_providers: a set of resource provider IDs for each resource"},{"line_number":676,"context_line":"        class requested"},{"line_number":677,"context_line":"    \"\"\""},{"line_number":678,"context_line":"    # SELECT rp.id, count(required_traits.name) AS required_traits_count"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_240f7ce2","line":675,"updated":"2017-08-07 22:52:15.000000000","message":"it\u0027s a dict so calling it a set here is confusing","commit_id":"a64fe93cbdb9ffadde272b8789d35f0d276883ba"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"cca832cd79c23a01ca98e311c364773eed4b424d","unresolved":false,"context_lines":[{"line_number":690,"context_line":"    # ) as required_traits"},{"line_number":691,"context_line":"    # ON rp.id \u003d required_traits.resource_provider_id OR"},{"line_number":692,"context_line":"    #   (shared_disk_gb.aggregate_id !\u003d null AND"},{"line_number":693,"context_line":"    #    required_traits.resource_provider_id in $(sharing_providers_ids))"},{"line_number":694,"context_line":"    # WHERE rp.id NOT IN $(sharing_providers_ids)"},{"line_number":695,"context_line":"    # GROUP BY rp.id"},{"line_number":696,"context_line":"    # HAVING required_traits_count \u003d len($(required_traits))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9f436f4f_8a12cc08","line":693,"range":{"start_line":693,"start_character":5,"end_line":693,"end_character":9},"updated":"2017-08-18 07:03:52.000000000","message":"the clause in the comment is inconsistent with code below, I suppose it should be required_traits.resource_provider_id \u003d sharing_disk_gb.resource_provider_id","commit_id":"a64fe93cbdb9ffadde272b8789d35f0d276883ba"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f24e000ef2b0733295d3b3bb89f3539f98121fdd","unresolved":false,"context_lines":[{"line_number":718,"context_line":"        name\u003d\u0027required_traits\u0027"},{"line_number":719,"context_line":"    )"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    # Primary selection is on the resource_providers table. The result will be"},{"line_number":722,"context_line":"    # include one entry for each resource provider, exclude the shared resource"},{"line_number":723,"context_line":"    # provider. Each entry includes the resource provider internal IDS and the"},{"line_number":724,"context_line":"    # count of associated traits. Since the associated traits will be filtered"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_e4f854c5","line":721,"updated":"2017-08-07 22:52:15.000000000","message":"s/ be$//","commit_id":"a64fe93cbdb9ffadde272b8789d35f0d276883ba"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f24e000ef2b0733295d3b3bb89f3539f98121fdd","unresolved":false,"context_lines":[{"line_number":719,"context_line":"    )"},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"    # Primary selection is on the resource_providers table. The result will be"},{"line_number":722,"context_line":"    # include one entry for each resource provider, exclude the shared resource"},{"line_number":723,"context_line":"    # provider. Each entry includes the resource provider internal IDS and the"},{"line_number":724,"context_line":"    # count of associated traits. Since the associated traits will be filtered"},{"line_number":725,"context_line":"    # by $required_traits, each resource provider will only returns the number"}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_c4f550cd","line":722,"updated":"2017-08-07 22:52:15.000000000","message":"excluding shared resource providers","commit_id":"a64fe93cbdb9ffadde272b8789d35f0d276883ba"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"f24e000ef2b0733295d3b3bb89f3539f98121fdd","unresolved":false,"context_lines":[{"line_number":727,"context_line":"    # the number of traits less than the length of $required_traits, which"},{"line_number":728,"context_line":"    # means the resource provider hasn\u0027t enough required traits. Only the"},{"line_number":729,"context_line":"    # resource providers which have the number of traits equals to the length"},{"line_number":730,"context_line":"    # of $required_traits are expected."},{"line_number":731,"context_line":"    query \u003d sa.select(["},{"line_number":732,"context_line":"        rpt.c.id,"},{"line_number":733,"context_line":"        sa.func.count(required_traits_tbl.c.name).label("}],"source_content_type":"text/x-python","patch_set":3,"id":"bf3e73b7_a4024cb3","line":730,"updated":"2017-08-07 22:52:15.000000000","message":"thanks for this description, very helpful","commit_id":"a64fe93cbdb9ffadde272b8789d35f0d276883ba"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6cd6e9281c27cbbe4381971c0bd82c3065c6a9b0","unresolved":false,"context_lines":[{"line_number":680,"context_line":"    # LEFT JOIN resource_provider_aggregates AS shared_disk_gb"},{"line_number":681,"context_line":"    # ON rp.id \u003d shared_disk_gb.resource_provider_id"},{"line_number":682,"context_line":"    # LEFT JOIN resource_provider_aggregates as sharing_disk_gb"},{"line_number":683,"context_line":"    # ON shared_disk_gb.aggregate_id \u003d sharing_disk_gb.aggregate_id"},{"line_number":684,"context_line":"    # JOIN ("},{"line_number":685,"context_line":"    #   SELECT traits.name, resource_provider_traits.resource_provider_id"},{"line_number":686,"context_line":"    #   FROM traits"}],"source_content_type":"text/x-python","patch_set":4,"id":"9f436f4f_d0dcd519","line":683,"updated":"2017-08-21 07:46:22.000000000","message":"there is a condition I missed also in the comment. That is for line 786","commit_id":"f303c6448ebf222d8b966d8db53ed8bb80059fa2"}]}
