)]}'
{"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"af6e1497a28136d68c5c638fff7368648736c6d2","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # queries, so the database won\u0027t take advantage of an index"},{"line_number":419,"context_line":"        # including both."},{"line_number":420,"context_line":"        name_qualifier \u003d dict(user_id\u003d\u0027\u0027, project_id\u003d\u0027project_\u0027)"},{"line_number":421,"context_line":"        background \u003d dict(user_id\u003dFalse, project_id\u003dTrue)"},{"line_number":422,"context_line":"        for primary in [\u0027user_id\u0027, \u0027project_id\u0027]:"},{"line_number":423,"context_line":"            name \u003d \u0027resource_%sidx\u0027 % name_qualifier[primary]"},{"line_number":424,"context_line":"            self.db.resource.ensure_index(["}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FrJw%3D","line":421,"updated":"2014-03-14 15:52:11.000000000","message":"why is one False and the other True?","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d69c90b14f35ae4991a41ac17e06a9892bc0dee2","unresolved":false,"context_lines":[{"line_number":418,"context_line":"        # queries, so the database won\u0027t take advantage of an index"},{"line_number":419,"context_line":"        # including both."},{"line_number":420,"context_line":"        name_qualifier \u003d dict(user_id\u003d\u0027\u0027, project_id\u003d\u0027project_\u0027)"},{"line_number":421,"context_line":"        background \u003d dict(user_id\u003dFalse, project_id\u003dTrue)"},{"line_number":422,"context_line":"        for primary in [\u0027user_id\u0027, \u0027project_id\u0027]:"},{"line_number":423,"context_line":"            name \u003d \u0027resource_%sidx\u0027 % name_qualifier[primary]"},{"line_number":424,"context_line":"            self.db.resource.ensure_index(["}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FN3I%3D","line":421,"in_reply_to":"AAAAWH%2F%2FrJw%3D","updated":"2014-03-19 16:21:56.000000000","message":"The idea to hit the upgrade case, without blocking further database operations while the new index is built over potentially a large volume of pre-exisiting data.\n\nIn that case the user_id index will already exist, so there\u0027s no heavy-lifting to be done, so it\u0027s fine to do that in the foreground as before.\n\nWhereas the project_id index won\u0027t exist, so we explicitly build it in the background to avoid blocking.","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"af6e1497a28136d68c5c638fff7368648736c6d2","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        name_qualifier \u003d dict(user_id\u003d\u0027\u0027, project_id\u003d\u0027project_\u0027)"},{"line_number":421,"context_line":"        background \u003d dict(user_id\u003dFalse, project_id\u003dTrue)"},{"line_number":422,"context_line":"        for primary in [\u0027user_id\u0027, \u0027project_id\u0027]:"},{"line_number":423,"context_line":"            name \u003d \u0027resource_%sidx\u0027 % name_qualifier[primary]"},{"line_number":424,"context_line":"            self.db.resource.ensure_index(["},{"line_number":425,"context_line":"                (primary, pymongo.ASCENDING),"},{"line_number":426,"context_line":"                (\u0027source\u0027, pymongo.ASCENDING),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FrJA%3D","line":423,"updated":"2014-03-14 15:52:11.000000000","message":"can we name it \u0027resource_%s_idx\u0027 % primary? seems a little simpler.","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d69c90b14f35ae4991a41ac17e06a9892bc0dee2","unresolved":false,"context_lines":[{"line_number":420,"context_line":"        name_qualifier \u003d dict(user_id\u003d\u0027\u0027, project_id\u003d\u0027project_\u0027)"},{"line_number":421,"context_line":"        background \u003d dict(user_id\u003dFalse, project_id\u003dTrue)"},{"line_number":422,"context_line":"        for primary in [\u0027user_id\u0027, \u0027project_id\u0027]:"},{"line_number":423,"context_line":"            name \u003d \u0027resource_%sidx\u0027 % name_qualifier[primary]"},{"line_number":424,"context_line":"            self.db.resource.ensure_index(["},{"line_number":425,"context_line":"                (primary, pymongo.ASCENDING),"},{"line_number":426,"context_line":"                (\u0027source\u0027, pymongo.ASCENDING),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FN2Q%3D","line":423,"in_reply_to":"AAAAWH%2F%2FrJA%3D","updated":"2014-03-19 16:21:56.000000000","message":"Well I wanted to be able to sub in an empty string in the case where we match the preexisting user_id-based index, whereas for project_id we sub in \u0027project_\u0027 with a trailing underscore.\n\nSo the net result is either resource_idx (as before) or resource_project_idx (for the new index).","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"af6e1497a28136d68c5c638fff7368648736c6d2","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            ], name\u003dname, background\u003dbackground[primary])"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            name \u003d \u0027meter_%sidx\u0027 % name_qualifier[primary]"},{"line_number":430,"context_line":"            self.db.meter.ensure_index(["},{"line_number":431,"context_line":"                (\u0027resource_id\u0027, pymongo.ASCENDING),"},{"line_number":432,"context_line":"                (primary, pymongo.ASCENDING),"},{"line_number":433,"context_line":"                (\u0027counter_name\u0027, pymongo.ASCENDING),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FrGQ%3D","line":430,"updated":"2014-03-14 15:52:11.000000000","message":"maybe out of scope of this patch but is this index actually useful? are we often pulling data specifically with this combination of fields?\n\nour api doesn\u0027t seem to ever have this collection.","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b266401dc833ae05e2bdb07bd4c1bc5aa51145ce","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            ], name\u003dname, background\u003dbackground[primary])"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            name \u003d \u0027meter_%sidx\u0027 % name_qualifier[primary]"},{"line_number":430,"context_line":"            self.db.meter.ensure_index(["},{"line_number":431,"context_line":"                (\u0027resource_id\u0027, pymongo.ASCENDING),"},{"line_number":432,"context_line":"                (primary, pymongo.ASCENDING),"},{"line_number":433,"context_line":"                (\u0027counter_name\u0027, pymongo.ASCENDING),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2B8pc%3D","line":430,"in_reply_to":"AAAAWH%2F%2FN1Q%3D","updated":"2014-03-21 13:24:24.000000000","message":"it\u0027s my understanding an index offers performance improvement on all queries involving any combination of listed attributes... and that the greater the number of combination of attributes, the worse the write performance (not sure about read)...\n\nour api\u0027s don\u0027t support this index completely (neither the index above) but i guess it\u0027s best left for another patch how to improve indices","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d69c90b14f35ae4991a41ac17e06a9892bc0dee2","unresolved":false,"context_lines":[{"line_number":427,"context_line":"            ], name\u003dname, background\u003dbackground[primary])"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            name \u003d \u0027meter_%sidx\u0027 % name_qualifier[primary]"},{"line_number":430,"context_line":"            self.db.meter.ensure_index(["},{"line_number":431,"context_line":"                (\u0027resource_id\u0027, pymongo.ASCENDING),"},{"line_number":432,"context_line":"                (primary, pymongo.ASCENDING),"},{"line_number":433,"context_line":"                (\u0027counter_name\u0027, pymongo.ASCENDING),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FN1Q%3D","line":430,"in_reply_to":"AAAAWH%2F%2FrGQ%3D","updated":"2014-03-19 16:21:56.000000000","message":"Do we need to query on *all* attributes of the index in order for it to be leveraged in the mongodb query plan?","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":8748,"name":"Stefano Zilli","email":"stefano.zilli@cern.ch","username":"szilli"},"change_message_id":"2f34ecdd91c5bb96f15fd2247cac45eaf9f0ecd4","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        self.db.meter.create_index("},{"line_number":460,"context_line":"            [(\u0027timestamp\u0027, pymongo.ASCENDING)],"},{"line_number":461,"context_line":"            expireAfterSeconds\u003dttl,"},{"line_number":462,"context_line":"            name\u003d\u0027meter_ttl\u0027"},{"line_number":463,"context_line":"        )"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FVsk%3D","line":461,"updated":"2014-03-18 14:39:32.000000000","message":"a bit out of scope but wouldn\u0027t be better to have also this one as background?","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d69c90b14f35ae4991a41ac17e06a9892bc0dee2","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"        self.db.meter.create_index("},{"line_number":460,"context_line":"            [(\u0027timestamp\u0027, pymongo.ASCENDING)],"},{"line_number":461,"context_line":"            expireAfterSeconds\u003dttl,"},{"line_number":462,"context_line":"            name\u003d\u0027meter_ttl\u0027"},{"line_number":463,"context_line":"        )"},{"line_number":464,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2FL3A%3D","line":461,"in_reply_to":"AAAAWH%2F%2FVsk%3D","updated":"2014-03-19 16:21:56.000000000","message":"Well the goal for this individual patch is not to impact on existing indices. But could address in a separate patch.","commit_id":"16bd8d107ac4841221bf1ac67c3a543905193c3e"}]}
