)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"63dab6bf1d1e87c2c7da651f77535594c69ca5ce","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Subsequent patches will explore why we need 22000 ProviderSummary"},{"line_number":27,"context_line":"objects when we\u0027re only producing 6500 resulting summaries to see"},{"line_number":28,"context_line":"if there is a cleanup that can be done there."},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"[1] https://docs.python.org/3/reference/datamodel.html#slots"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_f415eb3d","line":28,"updated":"2019-08-02 09:36:54.000000000","message":"This is because we\u0027ve got lots of summaries for each request group, prior to  _merge_candidates","commit_id":"9914ce8a9dc8eac980f53ceacaa94ed089220cfb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d5ab134daa302344780e02b7af2eb0ed15fbeed","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"In aggregate, creating and accessing these objects contributes a"},{"line_number":15,"context_line":"measurable cpu time cost. Using __slots__ [1] can speed up attribute"},{"line_number":16,"context_line":"access (I measured it, it does), so lets use it for the common"},{"line_number":17,"context_line":"objects. There\u0027s no evidence (yet) of other objects being an issue"},{"line_number":18,"context_line":"so we won\u0027t do this wholesale."},{"line_number":19,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_32f2b071","line":16,"range":{"start_line":16,"start_character":36,"end_line":16,"end_character":40},"updated":"2019-08-02 15:25:25.000000000","message":"let\u0027s","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"}],"placement/objects/resource_provider.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d74b99538341c11fdb87e77f54727c21898635e3","unresolved":false,"context_lines":[{"line_number":531,"context_line":"class ResourceProvider(object):"},{"line_number":532,"context_line":"    SETTABLE_FIELDS \u003d (\u0027name\u0027, \u0027parent_provider_uuid\u0027)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    __slots__ \u003d (\u0027_context\u0027, \u0027id\u0027, \u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027,"},{"line_number":535,"context_line":"                 \u0027parent_provider_uuid\u0027, \u0027root_provider_uuid\u0027, \u0027updated_at\u0027,"},{"line_number":536,"context_line":"                 \u0027created_at\u0027)"},{"line_number":537,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_a4789ec3","line":534,"range":{"start_line":534,"start_character":18,"end_line":534,"end_character":26},"updated":"2019-08-02 13:33:10.000000000","message":"This seems a bit weird.","commit_id":"9914ce8a9dc8eac980f53ceacaa94ed089220cfb"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d5ab134daa302344780e02b7af2eb0ed15fbeed","unresolved":false,"context_lines":[{"line_number":532,"context_line":"    SETTABLE_FIELDS \u003d (\u0027name\u0027, \u0027parent_provider_uuid\u0027)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    __slots__ \u003d (\u0027_context\u0027, \u0027id\u0027, \u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027,"},{"line_number":535,"context_line":"                 \u0027parent_provider_uuid\u0027, \u0027root_provider_uuid\u0027, \u0027updated_at\u0027,"},{"line_number":536,"context_line":"                 \u0027created_at\u0027)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"    def __init__(self, context, id\u003dNone, uuid\u003dNone, name\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_b278e0c3","line":535,"range":{"start_line":535,"start_character":17,"end_line":535,"end_character":61},"updated":"2019-08-02 15:25:25.000000000","message":"nit, these are in reverse order from how they\u0027re set below","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"2993aabb68717b4e2f821197393e0477525d0252","unresolved":false,"context_lines":[{"line_number":532,"context_line":"    SETTABLE_FIELDS \u003d (\u0027name\u0027, \u0027parent_provider_uuid\u0027)"},{"line_number":533,"context_line":""},{"line_number":534,"context_line":"    __slots__ \u003d (\u0027_context\u0027, \u0027id\u0027, \u0027uuid\u0027, \u0027name\u0027, \u0027generation\u0027,"},{"line_number":535,"context_line":"                 \u0027parent_provider_uuid\u0027, \u0027root_provider_uuid\u0027, \u0027updated_at\u0027,"},{"line_number":536,"context_line":"                 \u0027created_at\u0027)"},{"line_number":537,"context_line":""},{"line_number":538,"context_line":"    def __init__(self, context, id\u003dNone, uuid\u003dNone, name\u003dNone,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_adb08144","line":535,"range":{"start_line":535,"start_character":17,"end_line":535,"end_character":61},"in_reply_to":"7faddb67_b278e0c3","updated":"2019-08-02 15:30:53.000000000","message":"Order is meaningless for slots and in any case I did it in the order of the args to __init__.","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d5ab134daa302344780e02b7af2eb0ed15fbeed","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        return list("},{"line_number":637,"context_line":"            _get_aggregates_by_provider_id(self._context, self.id).values())"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def set_aggregates(self, aggregate_uuids, increment_generation\u003dFalse):"},{"line_number":640,"context_line":"        \"\"\"Set the aggregate uuids associated with this resource provider."},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        If an aggregate does not exist, one will be created using the"},{"line_number":643,"context_line":"        provided uuid."},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        The resource provider generation is incremented if and only if the"},{"line_number":646,"context_line":"        increment_generation parameter is True."},{"line_number":647,"context_line":"        \"\"\""},{"line_number":648,"context_line":"        _set_aggregates(self._context, self, aggregate_uuids,"},{"line_number":649,"context_line":"                        increment_generation\u003dincrement_generation)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def set_traits(self, traits):"},{"line_number":652,"context_line":"        \"\"\"Replaces the set of traits associated with the resource provider"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ed06791c","line":649,"range":{"start_line":639,"start_character":0,"end_line":649,"end_character":66},"updated":"2019-08-02 15:25:25.000000000","message":"yeah, remind me why we bother with these wrappers?","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"1f1cd135d03c3735195a7ae6584969643062c0c1","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        return list("},{"line_number":637,"context_line":"            _get_aggregates_by_provider_id(self._context, self.id).values())"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def set_aggregates(self, aggregate_uuids, increment_generation\u003dFalse):"},{"line_number":640,"context_line":"        \"\"\"Set the aggregate uuids associated with this resource provider."},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        If an aggregate does not exist, one will be created using the"},{"line_number":643,"context_line":"        provided uuid."},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        The resource provider generation is incremented if and only if the"},{"line_number":646,"context_line":"        increment_generation parameter is True."},{"line_number":647,"context_line":"        \"\"\""},{"line_number":648,"context_line":"        _set_aggregates(self._context, self, aggregate_uuids,"},{"line_number":649,"context_line":"                        increment_generation\u003dincrement_generation)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def set_traits(self, traits):"},{"line_number":652,"context_line":"        \"\"\"Replaces the set of traits associated with the resource provider"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_3830519f","line":649,"range":{"start_line":639,"start_character":0,"end_line":649,"end_character":66},"in_reply_to":"7faddb67_2dbed1d4","updated":"2019-08-02 16:32:40.000000000","message":"orite, thanks","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f630bcb3ba5adcb88cf382742cb0e0ff0fb8ad47","unresolved":false,"context_lines":[{"line_number":636,"context_line":"        return list("},{"line_number":637,"context_line":"            _get_aggregates_by_provider_id(self._context, self.id).values())"},{"line_number":638,"context_line":""},{"line_number":639,"context_line":"    def set_aggregates(self, aggregate_uuids, increment_generation\u003dFalse):"},{"line_number":640,"context_line":"        \"\"\"Set the aggregate uuids associated with this resource provider."},{"line_number":641,"context_line":""},{"line_number":642,"context_line":"        If an aggregate does not exist, one will be created using the"},{"line_number":643,"context_line":"        provided uuid."},{"line_number":644,"context_line":""},{"line_number":645,"context_line":"        The resource provider generation is incremented if and only if the"},{"line_number":646,"context_line":"        increment_generation parameter is True."},{"line_number":647,"context_line":"        \"\"\""},{"line_number":648,"context_line":"        _set_aggregates(self._context, self, aggregate_uuids,"},{"line_number":649,"context_line":"                        increment_generation\u003dincrement_generation)"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":"    def set_traits(self, traits):"},{"line_number":652,"context_line":"        \"\"\"Replaces the set of traits associated with the resource provider"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_2dbed1d4","line":649,"range":{"start_line":639,"start_character":0,"end_line":649,"end_character":66},"in_reply_to":"7faddb67_ed06791c","updated":"2019-08-02 15:43:11.000000000","message":"Because _set_aggregates takes a context as the first param and has @db_api.placement_context_manager.writer which needs the context as the first param to do the engine facade stuff. This method doesn\u0027t take a context so we have to wrap it.","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"}],"placement/tests/unit/handlers/test_aggregate.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3d5ab134daa302344780e02b7af2eb0ed15fbeed","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        rp \u003d resource_provider.ResourceProvider(fake_context)"},{"line_number":34,"context_line":"        expected_message \u003d (\u0027Update conflict: Another thread concurrently \u0027"},{"line_number":35,"context_line":"                            \u0027updated the data\u0027)"},{"line_number":36,"context_line":"        with mock.patch(\"placement.objects.resource_provider._set_aggregates\","},{"line_number":37,"context_line":"                        side_effect\u003dexception.ConcurrentUpdateDetected):"},{"line_number":38,"context_line":"            exc \u003d self.assertRaises(webob.exc.HTTPConflict,"},{"line_number":39,"context_line":"                                    aggregate._set_aggregates, rp, [])"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_d20a3c24","line":36,"range":{"start_line":36,"start_character":24,"end_line":36,"end_character":77},"updated":"2019-08-02 15:25:25.000000000","message":"probably better as \n\n \"placement.objects.resource_provider.ResourceProvider.set_aggregates\"\n\nbut this is fine","commit_id":"5d3243f4b923ca27bcbaa0919498498337046470"}]}
