)]}'
{"nova/quota.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cf532256e638e223097382043739051541d552f6","unresolved":false,"context_lines":[{"line_number":1185,"context_line":"    \"\"\""},{"line_number":1186,"context_line":"    # NOTE(melwitt): Counting across cells for instances, cores, and ram means"},{"line_number":1187,"context_line":"    # we will miss counting resources if a cell is down."},{"line_number":1188,"context_line":"    # NOTE(tssurya): We only go into those cells in which the tenant has"},{"line_number":1189,"context_line":"    # instances. We could optimize this to avoid the CellMappingList query"},{"line_number":1190,"context_line":"    # for single-cell deployments by checking the cell cache and only doing"},{"line_number":1191,"context_line":"    # this filtering if there is more than one non-cell0 cell."},{"line_number":1192,"context_line":"    # TODO(tssurya): Consider adding a scatter_gather_cells_for_project"},{"line_number":1193,"context_line":"    # variant that makes this native to nova.context."},{"line_number":1194,"context_line":"    if CONF.api.instance_list_per_project_cells:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_56756163","line":1191,"range":{"start_line":1188,"start_character":4,"end_line":1191,"end_character":62},"updated":"2020-05-16 01:17:16.000000000","message":"Surya actually mentioned this issue here, heh.","commit_id":"ab16946885e68ccdef7222a71cc0ad6f92b10de7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cf532256e638e223097382043739051541d552f6","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"    # this filtering if there is more than one non-cell0 cell."},{"line_number":1192,"context_line":"    # TODO(tssurya): Consider adding a scatter_gather_cells_for_project"},{"line_number":1193,"context_line":"    # variant that makes this native to nova.context."},{"line_number":1194,"context_line":"    if CONF.api.instance_list_per_project_cells:"},{"line_number":1195,"context_line":"        cell_mappings \u003d objects.CellMappingList.get_by_project_id("},{"line_number":1196,"context_line":"            context, project_id)"},{"line_number":1197,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_f6111506","line":1194,"updated":"2020-05-16 01:17:16.000000000","message":"That said, I think it makes sense to control this via the config option since we have it specifically for this case -- to let the operator decide and control whether a project filtering perf hit is yields better overall performance than skipping it and just querying all cells (N cells vs single cell).","commit_id":"ab16946885e68ccdef7222a71cc0ad6f92b10de7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cf532256e638e223097382043739051541d552f6","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"        cell_mappings \u003d nova_context.CELLS"},{"line_number":1200,"context_line":"    results \u003d nova_context.scatter_gather_cells("},{"line_number":1201,"context_line":"        context, cell_mappings, nova_context.CELL_TIMEOUT,"},{"line_number":1202,"context_line":"        objects.InstanceList.get_counts, project_id, user_id\u003duser_id)"},{"line_number":1203,"context_line":"    total_counts \u003d {\u0027project\u0027: {\u0027instances\u0027: 0, \u0027cores\u0027: 0, \u0027ram\u0027: 0}}"},{"line_number":1204,"context_line":"    if user_id:"},{"line_number":1205,"context_line":"        total_counts[\u0027user\u0027] \u003d {\u0027instances\u0027: 0, \u0027cores\u0027: 0, \u0027ram\u0027: 0}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff570b3c_f69bd562","line":1202,"range":{"start_line":1202,"start_character":41,"end_line":1202,"end_character":51},"updated":"2020-05-16 01:17:16.000000000","message":"Note to self: this makes sure we only look at instances scoped to the project needed for the quota check, regardless of which cells were passed.","commit_id":"ab16946885e68ccdef7222a71cc0ad6f92b10de7"}]}
