)]}'
{"ceilometer/event/storage/impl_mongodb.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"ab43a4bf135a9fca039558390296de1ac72fa8ab","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                self.db.event.drop_index(index_name)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self.db.event.create_index([(\u0027event_type\u0027, pymongo.ASCENDING)],"},{"line_number":70,"context_line":"                                   name\u003d\u0027dft_type_idx\u0027)"},{"line_number":71,"context_line":"        self.db.event.create_index([(\u0027message_id\u0027, pymongo.ASCENDING)],"},{"line_number":72,"context_line":"                                   name\u003d\u0027dft_message_id_idx\u0027)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_8ffe11ac","line":70,"updated":"2016-05-31 18:19:21.000000000","message":"what does dft stand for?","commit_id":"2cb771d72cb61dd28a7932e63ded74b02f890e5d"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"f0e2361c9dd176523c57b9a380bc0a7524b385e5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                self.db.event.drop_index(index_name)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        self.db.event.create_index([(\u0027event_type\u0027, pymongo.ASCENDING)],"},{"line_number":70,"context_line":"                                   name\u003d\u0027dft_type_idx\u0027)"},{"line_number":71,"context_line":"        self.db.event.create_index([(\u0027message_id\u0027, pymongo.ASCENDING)],"},{"line_number":72,"context_line":"                                   name\u003d\u0027dft_message_id_idx\u0027)"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_3d557fc5","line":70,"in_reply_to":"9abb7d3a_8ffe11ac","updated":"2016-06-01 09:54:49.000000000","message":"dft is for \"default\" to show that this index is created by default. I agree that it is not readable will improve.","commit_id":"2cb771d72cb61dd28a7932e63ded74b02f890e5d"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"ab43a4bf135a9fca039558390296de1ac72fa8ab","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.db.event.create_index([(\u0027event_type\u0027, pymongo.ASCENDING)],"},{"line_number":70,"context_line":"                                   name\u003d\u0027dft_type_idx\u0027)"},{"line_number":71,"context_line":"        self.db.event.create_index([(\u0027message_id\u0027, pymongo.ASCENDING)],"},{"line_number":72,"context_line":"                                   name\u003d\u0027dft_message_id_idx\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        ttl \u003d cfg.CONF.database.event_time_to_live"},{"line_number":75,"context_line":"        impl_mongodb.Connection.update_ttl(ttl, \u0027event_ttl\u0027, \u0027timestamp\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_cff4995c","line":72,"updated":"2016-05-31 18:19:21.000000000","message":"why do we need index on message_id, it\u0027s a random uuid?","commit_id":"2cb771d72cb61dd28a7932e63ded74b02f890e5d"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"f0e2361c9dd176523c57b9a380bc0a7524b385e5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        self.db.event.create_index([(\u0027event_type\u0027, pymongo.ASCENDING)],"},{"line_number":70,"context_line":"                                   name\u003d\u0027dft_type_idx\u0027)"},{"line_number":71,"context_line":"        self.db.event.create_index([(\u0027message_id\u0027, pymongo.ASCENDING)],"},{"line_number":72,"context_line":"                                   name\u003d\u0027dft_message_id_idx\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"        ttl \u003d cfg.CONF.database.event_time_to_live"},{"line_number":75,"context_line":"        impl_mongodb.Connection.update_ttl(ttl, \u0027event_ttl\u0027, \u0027timestamp\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_dd49d332","line":72,"in_reply_to":"9abb7d3a_cff4995c","updated":"2016-06-01 09:54:49.000000000","message":"Thank you for notice this, we do not have message_id field in stored data structure so that index is redundant.","commit_id":"2cb771d72cb61dd28a7932e63ded74b02f890e5d"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d32cd163d28dc5119205989ef3b9df60ba96ccdd","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        if \u0027event\u0027 not in self.db.conn.collection_names():"},{"line_number":58,"context_line":"            self.db.conn.create_collection(\u0027event\u0027)"},{"line_number":59,"context_line":"        # Establish indexes"},{"line_number":60,"context_line":"        # NOTE(idegtiarov): This indexes cover get_events, get_event_types, and"},{"line_number":61,"context_line":"        # get_trait_types requests based on event_type and timestamp fields."},{"line_number":62,"context_line":"        # Before creation new default indexes we need to drop old."},{"line_number":63,"context_line":"        event_idxs \u003d self.db.event.index_information()"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_19477778","line":61,"range":{"start_line":60,"start_character":28,"end_line":61,"end_character":76},"updated":"2016-08-03 13:34:01.000000000","message":"Could you please modify the whole Note to reflect to the new behaviour below?","commit_id":"d7a223efed91f644b0d519b429c0f98522e3a9d9"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"559228019ea505cbaba96f36ebe518a72c013166","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # update or create time_to_live index"},{"line_number":241,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"},{"line_number":242,"context_line":"        self.update_ttl(ttl, \u0027meter_ttl\u0027, \u0027timestamp\u0027, self.db.meter)"},{"line_number":243,"context_line":"        self.update_ttl(ttl, \u0027resource_ttl\u0027, \u0027last_sample_timestamp\u0027,"},{"line_number":244,"context_line":"                        self.db.resource)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_02a1b694","line":242,"updated":"2016-02-26 12:27:52.000000000","message":"Igor, how I understand we will have a two indexes on the timestamp: meter_ttl and timestamp_idx. Maybe it\u0027s be useful to create timestamp_idx index only if ttl is undefined?","commit_id":"338daa7ea09c4a94236fa1b9d845aeb1f37e55a8"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"76105e3fe36746df0c5af3fb84b0dc0724c6b471","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # update or create time_to_live index"},{"line_number":241,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"},{"line_number":242,"context_line":"        self.update_ttl(ttl, \u0027meter_ttl\u0027, \u0027timestamp\u0027, self.db.meter)"},{"line_number":243,"context_line":"        self.update_ttl(ttl, \u0027resource_ttl\u0027, \u0027last_sample_timestamp\u0027,"},{"line_number":244,"context_line":"                        self.db.resource)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9aed3d3a_0adcba71","line":242,"in_reply_to":"9aed3d3a_02a1b694","updated":"2016-02-29 17:11:39.000000000","message":"Hmm, according to the MongoDB docs, two sigle-field indexes with same order arguments is not useful and redundant. I think it\u0027s better to process situation when we have ttl and don\u0027t create  timestamp_idx index. Also, if it exists we should to delete it.","commit_id":"338daa7ea09c4a94236fa1b9d845aeb1f37e55a8"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"ca97dba6aa989b01f5d8c39ce613a9dc5cf4981e","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        # update or create time_to_live index"},{"line_number":241,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"},{"line_number":242,"context_line":"        self.update_ttl(ttl, \u0027meter_ttl\u0027, \u0027timestamp\u0027, self.db.meter)"},{"line_number":243,"context_line":"        self.update_ttl(ttl, \u0027resource_ttl\u0027, \u0027last_sample_timestamp\u0027,"},{"line_number":244,"context_line":"                        self.db.resource)"},{"line_number":245,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"7af24918_96cfb97e","line":242,"in_reply_to":"9aed3d3a_0adcba71","updated":"2016-03-02 09:32:01.000000000","message":"It almost correct but actually index could be created for one field if key is created with different sorting direction. But I agree that it is redundant and we do not need indexing one field twice when ttl is configured. I\u0027ve already working on patch with improving update_ttl method, but it required improving a great amount of events tests. Let new patch inherits this one.","commit_id":"338daa7ea09c4a94236fa1b9d845aeb1f37e55a8"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"397dd178aa7b1557a358360d36f889666bcfc20b","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                                      name\u003d\u0027default_resource_project_idx\u0027)"},{"line_number":237,"context_line":"        self.db.resource.create_index([(\u0027last_sample_timestamp\u0027,"},{"line_number":238,"context_line":"                                        pymongo.DESCENDING)],"},{"line_number":239,"context_line":"                                      name\u003d\u0027timestamp_idx\u0027)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        # update or create time_to_live index"},{"line_number":242,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_8807d780","line":239,"updated":"2016-08-02 12:15:48.000000000","message":"why did you rename this? i suggest you keep index name or else you need to drop original probably?","commit_id":"d7a223efed91f644b0d519b429c0f98522e3a9d9"},{"author":{"_account_id":9562,"name":"Ildiko Vancsa","email":"ildiko.vancsa@gmail.com","username":"ildikov"},"change_message_id":"d32cd163d28dc5119205989ef3b9df60ba96ccdd","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                                      name\u003d\u0027default_resource_project_idx\u0027)"},{"line_number":237,"context_line":"        self.db.resource.create_index([(\u0027last_sample_timestamp\u0027,"},{"line_number":238,"context_line":"                                        pymongo.DESCENDING)],"},{"line_number":239,"context_line":"                                      name\u003d\u0027timestamp_idx\u0027)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        # update or create time_to_live index"},{"line_number":242,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_7f13f35c","line":239,"in_reply_to":"bacf61ea_4be1599a","updated":"2016-08-03 13:34:01.000000000","message":"What I see in the next patch set is that the indices with this new name are dropped and then this whole thing is deleted, which seem wrong to me as if any old index exists that will be with the original name. Please keep the original name here.\n\nPlease correct me if I\u0027m wrong.","commit_id":"d7a223efed91f644b0d519b429c0f98522e3a9d9"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"c9b9484b08e2874188b2b66ac2668759ec7c0de3","unresolved":false,"context_lines":[{"line_number":236,"context_line":"                                      name\u003d\u0027default_resource_project_idx\u0027)"},{"line_number":237,"context_line":"        self.db.resource.create_index([(\u0027last_sample_timestamp\u0027,"},{"line_number":238,"context_line":"                                        pymongo.DESCENDING)],"},{"line_number":239,"context_line":"                                      name\u003d\u0027timestamp_idx\u0027)"},{"line_number":240,"context_line":""},{"line_number":241,"context_line":"        # update or create time_to_live index"},{"line_number":242,"context_line":"        ttl \u003d cfg.CONF.database.metering_time_to_live"}],"source_content_type":"text/x-python","patch_set":10,"id":"bacf61ea_4be1599a","line":239,"in_reply_to":"bacf61ea_8807d780","updated":"2016-08-02 12:33:15.000000000","message":"ok, i see the change in the next patch. i think it\u0027s better still to just leave it since you never seem to drop original last_sample_timestamp_idx index","commit_id":"d7a223efed91f644b0d519b429c0f98522e3a9d9"}]}
