)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6924,"name":"Pradeep Kilambi","email":"pkilambi@redhat.com","username":"pkilambi"},"change_message_id":"fb3871784f697d92b4274cad48fc7b5e006c86fc","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This patch aims to delete AlarmChanges."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The functionality of deleting AlarmChanges isn\u0027t in ceilometer-expirer."},{"line_number":15,"context_line":"Because deleting cycle is different between AlarmChanges and other datas."},{"line_number":16,"context_line":"We implemented the deleting AlarmChanges functionality as independent command."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ib6bda6df720cf8514b621bfe13dd3acba941949f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAXH%2F%2F43I%3D","line":15,"updated":"2014-04-16 17:13:51.000000000","message":"few nits: \"delete cycle\" , \"other data\"","commit_id":"2b6ecda0212250823e4dc12ce88f81aedef6f211"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"5bf095ea86a43c01b967b1186d4622c96c91d653","unresolved":false,"context_lines":[{"line_number":12,"context_line":"This patch aims to delete AlarmChanges."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"The functionality of deleting AlarmChanges isn\u0027t in ceilometer-expirer."},{"line_number":15,"context_line":"Because deleting cycle is different between AlarmChanges and other datas."},{"line_number":16,"context_line":"We implemented the deleting AlarmChanges functionality as independent command."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: Ib6bda6df720cf8514b621bfe13dd3acba941949f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAXH%2F%2FzKk%3D","line":15,"in_reply_to":"AAAAXH%2F%2F43I%3D","updated":"2014-04-17 11:16:13.000000000","message":"Done in PatchSet3.","commit_id":"2b6ecda0212250823e4dc12ce88f81aedef6f211"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"Remained AlarmChanges would be cause of wasted disk-space and slow response."},{"line_number":11,"context_line":"This patch aims to delete AlarmChanges."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Implements: blueprint delete-alarmhistory"},{"line_number":14,"context_line":"Change-Id: Ib6bda6df720cf8514b621bfe13dd3acba941949f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"5a890539_42195b21","line":13,"updated":"2014-12-01 03:48:52.000000000","message":"maybe we should add a DocImpact tag here","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"}],"ceilometer/alarm/storage/__init__.py":[{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#"},{"line_number":2,"context_line":"# Copyright 2014 NTT corp."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Author: Rikimaru Honjo \u003crikimaru@po.ntts.co.jp\u003e"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_efaedea0","line":1,"updated":"2014-08-13 13:31:57.000000000","message":"You don\u0027t need to keep empty line here","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"}],"ceilometer/alarm/storage/base.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        return cls.STORAGE_CAPABILITIES"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    @staticmethod"},{"line_number":147,"context_line":"    def clear_expired_alarm_hostory_data(alarm_history_ttl):"},{"line_number":148,"context_line":"        \"\"\"Clear expired alarm history data from the backend storage system."},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        Clearing occurs according to the time-to-live."}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_df02cc0c","line":147,"updated":"2014-08-12 21:35:54.000000000","message":"s/hostory/history/","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"}],"ceilometer/alarm/storage/impl_log.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    def delete_alarm(self, alarm_id):"},{"line_number":49,"context_line":"        \"\"\"Delete an alarm.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def clear_expired_alarm_hostory_data(self, alarm_history_ttl):"},{"line_number":52,"context_line":"        \"\"\"Clear expired alarm history data from the backend storage system."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        Clearing occurs according to the time-to-live."}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_e28c5784","line":51,"updated":"2014-08-12 21:35:54.000000000","message":"s/hostory/history/","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"}],"ceilometer/alarm/storage/impl_mongodb.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                                           name\u003d\u0027timestamp_idx\u0027)"},{"line_number":74,"context_line":"        # remove API v1 related table"},{"line_number":75,"context_line":"        self.db.user.drop()"},{"line_number":76,"context_line":"        self.db.project.drop()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        indexes \u003d self.db.alarm_history.index_information()"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_8220fb4c","line":76,"updated":"2014-08-12 21:35:54.000000000","message":"don\u0027t quite understand why these are here.","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                                           name\u003d\u0027timestamp_idx\u0027)"},{"line_number":74,"context_line":"        # remove API v1 related table"},{"line_number":75,"context_line":"        self.db.user.drop()"},{"line_number":76,"context_line":"        self.db.project.drop()"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        indexes \u003d self.db.alarm_history.index_information()"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_cfb59ad0","line":76,"in_reply_to":"baada198_8220fb4c","updated":"2014-08-13 13:31:57.000000000","message":"Yes, that looks like separate change for me.","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        ttl \u003d cfg.CONF.database.alarm_history_time_to_live"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        if ttl \u003c\u003d 0:"},{"line_number":83,"context_line":"            if \u0027alarm_history_ttl\u0027 in indexes:"},{"line_number":84,"context_line":"                self.db.alarm_history.drop_index(\u0027alarm_history_ttl\u0027)"},{"line_number":85,"context_line":"            return"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_c2e033fc","line":83,"updated":"2014-08-12 21:35:54.000000000","message":"can we just make the above one if statement rather than nested?","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            name\u003d\u0027alarm_history_ttl\u0027"},{"line_number":101,"context_line":"        )"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def clear_expired_alarm_hostory_data(self, alarm_history_ttl):"},{"line_number":104,"context_line":"        \"\"\"Clear expired alarm history data from the backend storage system."},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        Clearing occurs according to the time-to-live."}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_bfa99828","line":103,"updated":"2014-08-12 21:35:54.000000000","message":"s/hostory/history","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"        ttl \u003d cfg.CONF.database.alarm_history_time_to_live"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"        if ttl \u003c\u003d 0:"},{"line_number":80,"context_line":"            if \u0027alarm_history_ttl\u0027 in indexes:"},{"line_number":81,"context_line":"                self.db.alarm_history.drop_index(\u0027alarm_history_ttl\u0027)"},{"line_number":82,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_42c31b38","line":79,"updated":"2014-12-01 03:48:52.000000000","message":"there is a static method in ceilometer.storage.impl_mongodb named update_ttl, see https://github.com/openstack/ceilometer/blob/master/ceilometer/storage/impl_mongodb.py#L405, maybe we can reuse it (some slight change may be needed)","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"}],"ceilometer/alarm/storage/impl_sqlalchemy.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":309,"context_line":"            alarm_change_row.update(alarm_change)"},{"line_number":310,"context_line":"            session.add(alarm_change_row)"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def clear_expired_alarm_hostory_data(self, alarm_history_ttl):"},{"line_number":313,"context_line":"        \"\"\"Clear expired alarm history data from the backend storage system."},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"        Clearing occurs according to the time-to-live."}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_3f8f48d5","line":312,"updated":"2014-08-12 21:35:54.000000000","message":"s/hostory/history/","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":7478,"name":"Nadya Shakhat","email":"nadmi4@gmail.com","username":"nprivalova"},"change_message_id":"1f597834043c9189797377d8890b9ec896d97e01","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                  records for."},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":338,"context_line":"        with session.begin():"},{"line_number":339,"context_line":"            end \u003d (timeutils.utcnow() -"},{"line_number":340,"context_line":"                   datetime.timedelta(seconds\u003dalarm_history_ttl))"},{"line_number":341,"context_line":"            (session.query(models.AlarmChange)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba7be1f8_789ee255","line":338,"updated":"2015-03-02 15:09:01.000000000","message":"as for me, smth like \u0027last_start\u0027 or \u0027valid_start\u0027 , \u0027earliest_start\u0027 would be better then \u0027end\u0027 :) because it means the most earliest timestamp for entries, all older ones should be deleted.","commit_id":"b912e6f8d0e2051de6395ee6b1856a88573e80af"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"9df913a2a95044f8de9f83464d6015fd01d50ddb","unresolved":false,"context_lines":[{"line_number":335,"context_line":"                                  records for."},{"line_number":336,"context_line":"        \"\"\""},{"line_number":337,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":338,"context_line":"        with session.begin():"},{"line_number":339,"context_line":"            end \u003d (timeutils.utcnow() -"},{"line_number":340,"context_line":"                   datetime.timedelta(seconds\u003dalarm_history_ttl))"},{"line_number":341,"context_line":"            (session.query(models.AlarmChange)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba7be1f8_d92c0d05","line":338,"in_reply_to":"ba7be1f8_789ee255","updated":"2015-03-03 07:07:43.000000000","message":"Done","commit_id":"b912e6f8d0e2051de6395ee6b1856a88573e80af"},{"author":{"_account_id":1894,"name":"Ryota MIBU","email":"r-mibu@cq.jp.nec.com","username":"r-mibu"},"change_message_id":"5a730ed96f890d23d1b6a2d0b55b0cd9042242b5","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            end \u003d (timeutils.utcnow() -"},{"line_number":340,"context_line":"                   datetime.timedelta(seconds\u003dalarm_history_ttl))"},{"line_number":341,"context_line":"            (session.query(models.AlarmChange)"},{"line_number":342,"context_line":"                .filter(models.AlarmChange.timestamp \u003c end).delete())"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba7be1f8_f36be582","line":342,"updated":"2015-03-02 07:53:38.000000000","message":"Could you add log.info message to show how many alarm_history (rows) are removed from database just like other similar functions do, such as clear_expired_event_data and clear_expired_metering_data?\n\nIt might be helpful to operator how your developed option works in their environment.","commit_id":"b912e6f8d0e2051de6395ee6b1856a88573e80af"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"9df913a2a95044f8de9f83464d6015fd01d50ddb","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            end \u003d (timeutils.utcnow() -"},{"line_number":340,"context_line":"                   datetime.timedelta(seconds\u003dalarm_history_ttl))"},{"line_number":341,"context_line":"            (session.query(models.AlarmChange)"},{"line_number":342,"context_line":"                .filter(models.AlarmChange.timestamp \u003c end).delete())"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba7be1f8_99eff5b0","line":342,"in_reply_to":"ba7be1f8_f36be582","updated":"2015-03-03 07:07:43.000000000","message":"Done","commit_id":"b912e6f8d0e2051de6395ee6b1856a88573e80af"}],"ceilometer/cli.py":[{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":57,"context_line":"cfg.CONF.register_opts(OPTS, group\u003d\u0027alarm\u0027)"},{"line_number":58,"context_line":"cfg.CONF.import_opt(\u0027sample_time_to_live\u0027, \u0027ceilometer.storage\u0027,"},{"line_number":59,"context_line":"                    group\u003d\u0027database\u0027)"},{"line_number":60,"context_line":"cfg.CONF.import_opt(\u0027alarm_history_time_to_live\u0027, \u0027ceilometer.storage\u0027,"},{"line_number":61,"context_line":"                    group\u003d\u0027database\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"LOG \u003d logging.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_8e0de840","line":60,"updated":"2014-07-04 08:13:05.000000000","message":"can be ignored: import whole group to reduce two lines? seems not so useful....","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def storage_expirer():"},{"line_number":117,"context_line":"    service.prepare_service()"},{"line_number":118,"context_line":"    if cfg.CONF.database.sample_time_to_live \u003e 0:"},{"line_number":119,"context_line":"        LOG.debug(_(\"Clearing expired data\"))"},{"line_number":120,"context_line":"        storage_conn \u003d storage.get_connection_from_config(cfg.CONF)"},{"line_number":121,"context_line":"        storage_conn.clear_expired_data("}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ae754ccc","line":118,"updated":"2014-07-04 08:13:05.000000000","message":"-1: since alarm ttl is different with sample ttl now, why only check the sample ttl here? if sample ttl \u003c\u003d0 but alarm ttl \u003e 0, then then function will report \"nothing to clean\"....","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def storage_expirer():"},{"line_number":117,"context_line":"    service.prepare_service()"},{"line_number":118,"context_line":"    if cfg.CONF.database.sample_time_to_live \u003e 0:"},{"line_number":119,"context_line":"        LOG.debug(_(\"Clearing expired data\"))"},{"line_number":120,"context_line":"        storage_conn \u003d storage.get_connection_from_config(cfg.CONF)"},{"line_number":121,"context_line":"        storage_conn.clear_expired_data("}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_9bddd6e2","line":118,"in_reply_to":"baada198_ae754ccc","updated":"2014-07-08 07:55:02.000000000","message":"Done.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"67851bb6d1bbf951f3aa6a7653d647ddf52a250c","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"def storage_expirer():"},{"line_number":117,"context_line":"    service.prepare_service()"},{"line_number":118,"context_line":"    if cfg.CONF.database.sample_time_to_live \u003e 0:"},{"line_number":119,"context_line":"        LOG.debug(_(\"Clearing expired data\"))"},{"line_number":120,"context_line":"        storage_conn \u003d storage.get_connection_from_config(cfg.CONF)"},{"line_number":121,"context_line":"        storage_conn.clear_expired_data("}],"source_content_type":"text/x-python","patch_set":12,"id":"baada198_0128c984","line":118,"updated":"2014-07-04 08:14:24.000000000","message":"-1: should check two ttl value","commit_id":"c271e2da79574613d785b03003a37b90a4338903"}],"ceilometer/cmd/storage.py":[{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    if cfg.CONF.database.alarm_history_time_to_live \u003e 0:"},{"line_number":49,"context_line":"        LOG.debug(_(\"Clearing expired alarm history data\"))"},{"line_number":50,"context_line":"        storage_conn \u003d storage.get_connection_from_config(cfg.CONF, \u0027alarm\u0027)"},{"line_number":51,"context_line":"        storage_conn.clear_expired_alarm_hostory_data("},{"line_number":52,"context_line":"            cfg.CONF.database.alarm_history_time_to_live)"},{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        LOG.info(_(\"Nothing to clean, alarm history database time to live is \""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_4fd26ad0","line":51,"range":{"start_line":51,"start_character":21,"end_line":51,"end_character":53},"updated":"2014-08-13 13:31:57.000000000","message":"%s/hostory/history","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from ceilometer import service"},{"line_number":22,"context_line":"from ceilometer import storage"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"cfg.CONF.import_opt(\u0027sample_time_to_live\u0027, \u0027ceilometer.storage\u0027,"},{"line_number":25,"context_line":"                    group\u003d\u0027database\u0027)"},{"line_number":26,"context_line":"cfg.CONF.import_opt(\u0027alarm_history_time_to_live\u0027, \u0027ceilometer.alarm.storage\u0027,"},{"line_number":27,"context_line":"                    group\u003d\u0027database\u0027)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_2239af3f","line":24,"updated":"2014-12-01 03:48:52.000000000","message":"-1: no need to do this, because we already import ceilometer.storage in L22","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":42,"context_line":"        storage_conn.clear_expired_metering_data("},{"line_number":43,"context_line":"            cfg.CONF.database.sample_time_to_live)"},{"line_number":44,"context_line":"    else:"},{"line_number":45,"context_line":"        LOG.info(_(\"Nothing to clean, sample database time to live is \""},{"line_number":46,"context_line":"                   \"disabled\"))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    if cfg.CONF.database.alarm_history_time_to_live \u003e 0:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_821183b1","line":45,"updated":"2014-12-01 03:48:52.000000000","message":"-1: we should import _ before we use it, better to use _LI","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        storage_conn.clear_expired_alarm_history_data("},{"line_number":52,"context_line":"            cfg.CONF.database.alarm_history_time_to_live)"},{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        LOG.info(_(\"Nothing to clean, alarm history database time to live is \""},{"line_number":55,"context_line":"                   \"disabled\"))"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_421f9bb7","line":54,"updated":"2014-12-01 03:48:52.000000000","message":"ditto","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"}],"ceilometer/storage/__init__.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0a53cffb96624949364846a166288ed77f47b30","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"STORAGE_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.IntOpt(\u0027time_to_live\u0027,"},{"line_number":49,"context_line":"               default\u003d-1,"},{"line_number":50,"context_line":"               help\u003d\"Number of seconds that samples are kept \""},{"line_number":51,"context_line":"               \"in the database for (\u003c\u003d 0 means forever).\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_d8a008f7","line":48,"updated":"2014-05-01 11:28:18.000000000","message":"If we\u0027re introducing a new TTL scoped to a particular entity type, then we should rename this generic config option to be more reflective of its actual purpose.\n\nFor example it could be renamed as \u0027sample_time_to_live\u0027.\n\nThe deprecated_name kwarg could be used to that the old option name (i.e. \u0027time_to_live\u0027) continues to be recognized.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"c65e6d9c58576ea2b694c1c69db7f9b257715533","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"STORAGE_OPTS \u003d ["},{"line_number":48,"context_line":"    cfg.IntOpt(\u0027time_to_live\u0027,"},{"line_number":49,"context_line":"               default\u003d-1,"},{"line_number":50,"context_line":"               help\u003d\"Number of seconds that samples are kept \""},{"line_number":51,"context_line":"               \"in the database for (\u003c\u003d 0 means forever).\"),"}],"source_content_type":"text/x-python","patch_set":4,"id":"7adec928_0d886870","line":48,"in_reply_to":"9ad9bd40_d8a008f7","updated":"2014-05-09 11:11:51.000000000","message":"OK, it\u0027s done in PS5.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"}],"ceilometer/storage/impl_log.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0648334162bc72abc795a35ffbb261edd695c64d","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        \"\"\"Clear expired data from the backend storage system."},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"        Clearing occurs according to the time-to-live."},{"line_number":52,"context_line":"        :param sample_ttl: Number of seconds to sample keep records for."},{"line_number":53,"context_line":"        \"\"\""},{"line_number":54,"context_line":"        LOG.info(_(\"Dropping sample data with TTL %d\"), sample_ttl)"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_a2e6dfe5","line":52,"updated":"2014-08-12 21:35:54.000000000","message":"\"Number of seconds to keep sample records for\"","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"}],"ceilometer/storage/impl_mongodb.py":[{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0a53cffb96624949364846a166288ed77f47b30","unresolved":false,"context_lines":[{"line_number":613,"context_line":"                \u0027users\u0027: [],"},{"line_number":614,"context_line":"                \u0027projects\u0027: [],"},{"line_number":615,"context_line":"            }"},{"line_number":616,"context_line":"        )[0]"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        meter_reduce_results[\u0027users\u0027].extend("},{"line_number":619,"context_line":"            alarm_history_reduce_results[\u0027users\u0027])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_bd4fb691","line":616,"updated":"2014-05-01 11:28:18.000000000","message":"Hmmm, seems counter-intuitive \u0026 wrong to use the same reduction logic for grouping the meter and alarm_history collections, given that resource_id only exists for the former.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0a53cffb96624949364846a166288ed77f47b30","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        )[0]"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        meter_reduce_results[\u0027users\u0027].extend("},{"line_number":619,"context_line":"            alarm_history_reduce_results[\u0027users\u0027])"},{"line_number":620,"context_line":"        userIdList \u003d list(set("},{"line_number":621,"context_line":"            user_id for user_id in meter_reduce_results[\u0027users\u0027]))"},{"line_number":622,"context_line":"        self.db.user.remove({\u0027_id\u0027: {\u0027$nin\u0027: userIdList}})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_1d77c2d5","line":619,"updated":"2014-05-01 11:28:18.000000000","message":"Previously, a user owning an alarm history event was not sufficient to force that user entry to remain in the users collection (in the mongo case at least).\n\nThe implication was that the users collection contains all those users for whom we currently store *samples*, not all the users for whom we either either have live samples *or* past alarm history events.\n\nIt would be one thing to change the lifecycle of the users collections to include consideration of *alarm* ownership, but not so much for *alarm history*, because:\n\n(a) alarm history retention is essentially optional\n\n(b) alarm history is retained after the corresponding alarm is deleted, so an alarm change may still be persisted even if there\u0027s nothing \"live\" left in the metering store relating to the alarm\n\nSo IIUC (b) would imply that if alarm_history_time_to_live\u003d\u003d-1, an alarm having existed at *any* time in the past for a particular user will guarantee that this user is never deleted from the users collection, even if samples are no longer being collection nor alarms being evaluated for that user.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"8da894ffb797cb2d33947bb2b35c993a7e2dab1f","unresolved":false,"context_lines":[{"line_number":616,"context_line":"        )[0]"},{"line_number":617,"context_line":""},{"line_number":618,"context_line":"        meter_reduce_results[\u0027users\u0027].extend("},{"line_number":619,"context_line":"            alarm_history_reduce_results[\u0027users\u0027])"},{"line_number":620,"context_line":"        userIdList \u003d list(set("},{"line_number":621,"context_line":"            user_id for user_id in meter_reduce_results[\u0027users\u0027]))"},{"line_number":622,"context_line":"        self.db.user.remove({\u0027_id\u0027: {\u0027$nin\u0027: userIdList}})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_4c16d9a8","line":619,"in_reply_to":"9ad9bd40_1d77c2d5","updated":"2014-05-02 17:50:09.000000000","message":"Let me confirm: do you mean that users collection need to contain all\nthose users for whom we currently store samples, but not for alarm\nhistories?\nIf so, i\u0027m ok to revert the code (cancel lines from 596 to 631, restore\noriginal 580-593).\nHowever, to do the same on sqlalchemy side, we need to drop the\nForeignKey constraint from alarm_history table (Please see the comment\non impl_sqlalchemy.py).","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0a53cffb96624949364846a166288ed77f47b30","unresolved":false,"context_lines":[{"line_number":622,"context_line":"        self.db.user.remove({\u0027_id\u0027: {\u0027$nin\u0027: userIdList}})"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        meter_reduce_results[\u0027projects\u0027].extend("},{"line_number":625,"context_line":"            alarm_history_reduce_results[\u0027projects\u0027])"},{"line_number":626,"context_line":"        projectIdList \u003d list(set("},{"line_number":627,"context_line":"            project_id for project_id in meter_reduce_results[\u0027projects\u0027]))"},{"line_number":628,"context_line":"        self.db.project.remove({\u0027_id\u0027: {\u0027$nin\u0027: projectIdList}})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_9d4af281","line":625,"updated":"2014-05-01 11:28:18.000000000","message":"Similarly for projects, as for users in the comment above.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":42,"context_line":"from ceilometer.storage import pymongo_base"},{"line_number":43,"context_line":"from ceilometer import utils"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"cfg.CONF.import_opt(\u0027sample_time_to_live\u0027, \u0027ceilometer.storage\u0027,"},{"line_number":46,"context_line":"                    group\u003d\"database\")"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_c259cb8f","line":45,"updated":"2014-12-01 03:48:52.000000000","message":"-1: no need to import again, see L38","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"}],"ceilometer/storage/impl_sqlalchemy.py":[{"author":{"_account_id":7763,"name":"Alexei Kornienko","email":"akornienko@mirantis.com","username":"akornienko"},"change_message_id":"343ffa27753b4c7a9f489b6c10f6101ffcc6a7a7","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":413,"context_line":"        with session.begin():"},{"line_number":414,"context_line":"            end \u003d timeutils.utcnow() - datetime.timedelta(seconds\u003dttl)"},{"line_number":415,"context_line":"            alarm_change_query \u003d session.query(models.AlarmChange)\\"},{"line_number":416,"context_line":"                .filter(models.AlarmChange.timestamp \u003c end)"},{"line_number":417,"context_line":"            for alarm_change_obj in alarm_change_query.all():"},{"line_number":418,"context_line":"                session.delete(alarm_change_obj)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXH%2F%2FRtk%3D","line":415,"updated":"2014-04-22 19:54:03.000000000","message":"Instead of iterating each record you should simply call .delete() method on query object.","commit_id":"11e569be860f6cdc31ea7d4ca0f6c05ec9cec1b1"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"d0a53cffb96624949364846a166288ed77f47b30","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                ~models.User.id.in_(session.query(models.Sample.user_id)"},{"line_number":382,"context_line":"                                    .group_by(models.Sample.user_id)),"},{"line_number":383,"context_line":"                ~models.User.id.in_(session.query(models.AlarmChange.user_id)"},{"line_number":384,"context_line":"                                    .group_by(models.AlarmChange.user_id))"},{"line_number":385,"context_line":"            )"},{"line_number":386,"context_line":"            for user_obj in query.all():"},{"line_number":387,"context_line":"                session.delete(user_obj)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_fd177e4f","line":384,"updated":"2014-05-01 11:28:18.000000000","message":"Hmmm, not related to your patch, but I think including alarm change events in the determination of which users to protect from deletion is wrong, for the reasons explained in the comments on impl_mongo.py.","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"8da894ffb797cb2d33947bb2b35c993a7e2dab1f","unresolved":false,"context_lines":[{"line_number":381,"context_line":"                ~models.User.id.in_(session.query(models.Sample.user_id)"},{"line_number":382,"context_line":"                                    .group_by(models.Sample.user_id)),"},{"line_number":383,"context_line":"                ~models.User.id.in_(session.query(models.AlarmChange.user_id)"},{"line_number":384,"context_line":"                                    .group_by(models.AlarmChange.user_id))"},{"line_number":385,"context_line":"            )"},{"line_number":386,"context_line":"            for user_obj in query.all():"},{"line_number":387,"context_line":"                session.delete(user_obj)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9ad9bd40_6cd2bdd3","line":384,"in_reply_to":"9ad9bd40_fd177e4f","updated":"2014-05-02 17:50:09.000000000","message":"I think we can remove lines 383-384, so as to the bahavior becomes the\nsame as mongo case.\nHowever, to do so, we need to drop the ForeignKey constraints from\nalarm_history table\n(in ceilometer/storage/sqlalchemy/models.py, lines 308-310).\nIt seems ok to drop the constraints... Are there any reason that we\nshold keep these ForeignKey constraint?","commit_id":"5c2008c78a44ba4c066ef34c013d4f9d2dfd64e5"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"de94ab736efeaec03d58994065ea26abe8738375","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":357,"context_line":"        with session.begin():"},{"line_number":358,"context_line":"            if alarm_history_ttl \u003e 0:"},{"line_number":359,"context_line":"                end \u003d timeutils.utcnow() - \\"},{"line_number":360,"context_line":"                    datetime.timedelta(seconds\u003dalarm_history_ttl)"},{"line_number":361,"context_line":"                session.query(models.AlarmChange)\\"},{"line_number":362,"context_line":"                    .filter(models.AlarmChange.timestamp \u003c end).delete()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7adec928_6b90e943","line":359,"range":{"start_line":359,"start_character":31,"end_line":359,"end_character":32},"updated":"2014-05-09 22:27:11.000000000","message":"it\u0027s better using \n\na \u003d (b - \n   c)\n\nthen \n\na \u003d b - \\\n   c","commit_id":"380cb54d792b3a70990a20f94b26795a540bb2de"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"bf275d764b9ca7e24cf3ebff0cd3d6e495a1aee0","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":357,"context_line":"        with session.begin():"},{"line_number":358,"context_line":"            if alarm_history_ttl \u003e 0:"},{"line_number":359,"context_line":"                end \u003d timeutils.utcnow() - \\"},{"line_number":360,"context_line":"                    datetime.timedelta(seconds\u003dalarm_history_ttl)"},{"line_number":361,"context_line":"                session.query(models.AlarmChange)\\"},{"line_number":362,"context_line":"                    .filter(models.AlarmChange.timestamp \u003c end).delete()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7adec928_2826b2ce","line":359,"in_reply_to":"7adec928_306f09ff","updated":"2014-05-14 17:30:19.000000000","message":"Sorry I put right, it\u0027s done in PS7.","commit_id":"380cb54d792b3a70990a20f94b26795a540bb2de"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"260d8c64da576a95ecca1db9dc561405ff0cbfb6","unresolved":false,"context_lines":[{"line_number":356,"context_line":"        session \u003d self._engine_facade.get_session()"},{"line_number":357,"context_line":"        with session.begin():"},{"line_number":358,"context_line":"            if alarm_history_ttl \u003e 0:"},{"line_number":359,"context_line":"                end \u003d timeutils.utcnow() - \\"},{"line_number":360,"context_line":"                    datetime.timedelta(seconds\u003dalarm_history_ttl)"},{"line_number":361,"context_line":"                session.query(models.AlarmChange)\\"},{"line_number":362,"context_line":"                    .filter(models.AlarmChange.timestamp \u003c end).delete()"}],"source_content_type":"text/x-python","patch_set":5,"id":"7adec928_306f09ff","line":359,"in_reply_to":"7adec928_6b90e943","updated":"2014-05-13 19:26:05.000000000","message":"OK. It\u0027s done in PS6.","commit_id":"380cb54d792b3a70990a20f94b26795a540bb2de"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0b89683dc9ad41429ac2bd441a176fcdaade23d7","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                session.query(models.AlarmChange)\\"},{"line_number":358,"context_line":"                    .filter(models.AlarmChange.timestamp \u003c end).delete()"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"            end \u003d timeutils.utcnow() - datetime.timedelta(seconds\u003dsample_ttl)"},{"line_number":361,"context_line":"            sample_query \u003d session.query(models.Sample)\\"},{"line_number":362,"context_line":"                .filter(models.Sample.timestamp \u003c end)"},{"line_number":363,"context_line":"            for sample_obj in sample_query.all():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_0ca231ae","line":360,"updated":"2014-05-28 09:22:40.000000000","message":"Would it be better to put all sample processing in the if clause \u0027if sample_ttl \u003e 0:\u0027?","commit_id":"7ade03cf9d1e800e6b19d796c93154a7c2a58048"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"f221e88f1a43cda61090ac952291a9944f1ebb7d","unresolved":false,"context_lines":[{"line_number":357,"context_line":"                session.query(models.AlarmChange)\\"},{"line_number":358,"context_line":"                    .filter(models.AlarmChange.timestamp \u003c end).delete()"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"            end \u003d timeutils.utcnow() - datetime.timedelta(seconds\u003dsample_ttl)"},{"line_number":361,"context_line":"            sample_query \u003d session.query(models.Sample)\\"},{"line_number":362,"context_line":"                .filter(models.Sample.timestamp \u003c end)"},{"line_number":363,"context_line":"            for sample_obj in sample_query.all():"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_276358b2","line":360,"in_reply_to":"3ae8d1ca_0ca231ae","updated":"2014-05-29 11:48:20.000000000","message":"We think that it is unnecessary, because it\u0027s already doing in the cli.py.","commit_id":"7ade03cf9d1e800e6b19d796c93154a7c2a58048"}],"ceilometer/tests/storage/test_impl_mongodb.py":[{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                                        name\u003d\u0027meter_ttl\u0027))"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def test_alarm_history_ttl_index_absent(self):"},{"line_number":114,"context_line":"        # create a fake index and check it is deleted"},{"line_number":115,"context_line":"        self.conn.db.alarm_history.ensure_index(\u0027foo\u0027,"},{"line_number":116,"context_line":"                                                name\u003d\u0027alarm_history_ttl\u0027)"},{"line_number":117,"context_line":"        self.CONF.set_override(\u0027alarm_history_time_to_live\u0027, -1,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_0fb6b289","line":114,"updated":"2014-08-13 13:31:57.000000000","message":"Please, write \u0027check if it is deleted\u0027","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"}],"ceilometer/tests/storage/test_storage_scenarios.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"0b89683dc9ad41429ac2bd441a176fcdaade23d7","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"            self.conn.record_alarm_change(alarm_change\u003dalarm_change)"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2512,"context_line":"        if isinstance(self.conn, mongodb.Connection):"},{"line_number":2513,"context_line":"            return"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        self.mock_utcnow.return_value \u003d datetime.datetime(2013, 4, 7, 7, 30)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_ecd8a51f","line":2512,"updated":"2014-05-28 09:22:40.000000000","message":"Please copy the jd\u0027s note about mongodb case here.","commit_id":"7ade03cf9d1e800e6b19d796c93154a7c2a58048"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"f221e88f1a43cda61090ac952291a9944f1ebb7d","unresolved":false,"context_lines":[{"line_number":2509,"context_line":"            self.conn.record_alarm_change(alarm_change\u003dalarm_change)"},{"line_number":2510,"context_line":""},{"line_number":2511,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2512,"context_line":"        if isinstance(self.conn, mongodb.Connection):"},{"line_number":2513,"context_line":"            return"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"        self.mock_utcnow.return_value \u003d datetime.datetime(2013, 4, 7, 7, 30)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3ae8d1ca_a76e8894","line":2512,"in_reply_to":"3ae8d1ca_ecd8a51f","updated":"2014-05-29 11:48:20.000000000","message":"Done","commit_id":"7ade03cf9d1e800e6b19d796c93154a7c2a58048"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2499,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":2500,"context_line":"        for alarm in alarms:"},{"line_number":2501,"context_line":"            i \u003d alarms.index(alarm)"},{"line_number":2502,"context_line":"            alarm_change \u003d dict(event_id\u003d"},{"line_number":2503,"context_line":"                                \"3e11800c-a3ca-4991-b34b-d97efb6047d%s\" % i,"},{"line_number":2504,"context_line":"                                alarm_id\u003dalarm.alarm_id,"},{"line_number":2505,"context_line":"                                type\u003dmodels.AlarmChange.CREATION,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_cb17d2ec","line":2502,"updated":"2014-07-04 08:13:05.000000000","message":"how about:\n\n            alarm_change \u003d {\n                \u0027event_id\u0027: \u00273e11800c-a3ca-4991-b34b-d97efb6047d%s\u0027 % i,\n                \u0027alarm_id\u0027: alarm.alarm_id,\n                \u0027type\u0027: alarm_models.AlarmChange.CREATION,\n                \u0027detail\u0027: \"detail %s\" % alarm.name,\n                \u0027user_id\u0027: alarm.user_id,\n                \u0027project_id\u0027: alarm.project_id,\n                \u0027on_behalf_of\u0027: alarm.project_id,\n                \u0027timestamp\u0027: datetime.datetime(2014, 4, 7, 7, 30 + i)),\n            }","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"a2a32fefd73559b7f6ebc8d058e72de12a1677e8","unresolved":false,"context_lines":[{"line_number":2499,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":2500,"context_line":"        for alarm in alarms:"},{"line_number":2501,"context_line":"            i \u003d alarms.index(alarm)"},{"line_number":2502,"context_line":"            alarm_change \u003d dict(event_id\u003d"},{"line_number":2503,"context_line":"                                \"3e11800c-a3ca-4991-b34b-d97efb6047d%s\" % i,"},{"line_number":2504,"context_line":"                                alarm_id\u003dalarm.alarm_id,"},{"line_number":2505,"context_line":"                                type\u003dmodels.AlarmChange.CREATION,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_e1a0a3a7","line":2502,"in_reply_to":"baada198_3bf4ca59","updated":"2014-07-09 18:37:58.000000000","message":"IMHO, this is a bit more clean. non-blocking since it is just style problem","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":2499,"context_line":"        alarms \u003d list(self.conn.get_alarms())"},{"line_number":2500,"context_line":"        for alarm in alarms:"},{"line_number":2501,"context_line":"            i \u003d alarms.index(alarm)"},{"line_number":2502,"context_line":"            alarm_change \u003d dict(event_id\u003d"},{"line_number":2503,"context_line":"                                \"3e11800c-a3ca-4991-b34b-d97efb6047d%s\" % i,"},{"line_number":2504,"context_line":"                                alarm_id\u003dalarm.alarm_id,"},{"line_number":2505,"context_line":"                                type\u003dmodels.AlarmChange.CREATION,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_3bf4ca59","line":2502,"in_reply_to":"baada198_cb17d2ec","updated":"2014-07-08 07:55:02.000000000","message":"It is in same with line 2678.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2512,"context_line":"                                                            30 + i))"},{"line_number":2513,"context_line":"            self.conn.record_alarm_change(alarm_change\u003dalarm_change)"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2516,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"},{"line_number":2517,"context_line":"        # the collections, this is handled by MongoDB TTL feature."},{"line_number":2518,"context_line":"        if isinstance(self.conn, mongodb.Connection):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ce73604c","line":2515,"updated":"2014-07-04 08:13:05.000000000","message":"nit: the three tests are very similar, can there be a common function?","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":2512,"context_line":"                                                            30 + i))"},{"line_number":2513,"context_line":"            self.conn.record_alarm_change(alarm_change\u003dalarm_change)"},{"line_number":2514,"context_line":""},{"line_number":2515,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2516,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"},{"line_number":2517,"context_line":"        # the collections, this is handled by MongoDB TTL feature."},{"line_number":2518,"context_line":"        if isinstance(self.conn, mongodb.Connection):"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_9b04f64a","line":2515,"in_reply_to":"baada198_ce73604c","updated":"2014-07-08 07:55:02.000000000","message":"Done.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2516,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"},{"line_number":2517,"context_line":"        # the collections, this is handled by MongoDB TTL feature."},{"line_number":2518,"context_line":"        if isinstance(self.conn, mongodb.Connection):"},{"line_number":2519,"context_line":"            return"},{"line_number":2520,"context_line":""},{"line_number":2521,"context_line":"        self.mock_utcnow.return_value \u003d datetime.datetime(2013, 4, 7, 7, 30)"},{"line_number":2522,"context_line":"        self.conn.clear_expired_data(36000, 1)"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_4b102259","line":2519,"updated":"2014-07-04 08:13:05.000000000","message":"this comment can be ignored: Although there are existent examples for such case, but how about use testtools.skip(\u0027reason\u0027) instead of directly return? since return means the test is executed and it succeed, but skip explicitly shows test is not run with a detailed reason","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2527,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2528,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2529,"context_line":"            history_count +\u003d len(results)"},{"line_number":2530,"context_line":"        self.assertEqual(history_count, 3)"},{"line_number":2531,"context_line":""},{"line_number":2532,"context_line":"    def test_clear_some_alarm_history(self):"},{"line_number":2533,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_ee174443","line":2530,"updated":"2014-07-04 08:13:05.000000000","message":"nit: assertEqual(expected, actual) can be more useful when test fail","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":2527,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2528,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2529,"context_line":"            history_count +\u003d len(results)"},{"line_number":2530,"context_line":"        self.assertEqual(history_count, 3)"},{"line_number":2531,"context_line":""},{"line_number":2532,"context_line":"    def test_clear_some_alarm_history(self):"},{"line_number":2533,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_bbfffa32","line":2530,"in_reply_to":"baada198_ee174443","updated":"2014-07-08 07:55:02.000000000","message":"Done.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2545,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2546,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2547,"context_line":"            history_count +\u003d len(results)"},{"line_number":2548,"context_line":"        self.assertEqual(history_count, 1)"},{"line_number":2549,"context_line":""},{"line_number":2550,"context_line":"    def test_clear_all_alarm_history(self):"},{"line_number":2551,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_6e2334a7","line":2548,"updated":"2014-07-04 08:13:05.000000000","message":"nit: assertEqual(expected, actual) can be more useful when test fail","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":2545,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2546,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2547,"context_line":"            history_count +\u003d len(results)"},{"line_number":2548,"context_line":"        self.assertEqual(history_count, 1)"},{"line_number":2549,"context_line":""},{"line_number":2550,"context_line":"    def test_clear_all_alarm_history(self):"},{"line_number":2551,"context_line":"        # NOTE(jd) Override this test in MongoDB because our code doesn\u0027t clear"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_dbfaee41","line":2548,"in_reply_to":"baada198_6e2334a7","updated":"2014-07-08 07:55:02.000000000","message":"Done.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"b945455286134f80c1543d052439d15147160bec","unresolved":false,"context_lines":[{"line_number":2563,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2564,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2565,"context_line":"            history_count +\u003d len(results)"},{"line_number":2566,"context_line":"        self.assertEqual(history_count, 0)"},{"line_number":2567,"context_line":""},{"line_number":2568,"context_line":""},{"line_number":2569,"context_line":"class AlarmTestPagination(AlarmTestBase,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_0e4f186c","line":2566,"updated":"2014-07-04 08:13:05.000000000","message":"nit: assertEqual(expected, actual) can be more useful when test fail","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":8988,"name":"Rikimaru Honjo","email":"honjo.rikimaru@ntt-tx.co.jp","username":"rikimaru.honjo","inactive":true},"change_message_id":"59791c75778595124c3206441257f5aa2c922639","unresolved":false,"context_lines":[{"line_number":2563,"context_line":"                           alarm_id\u003dalarm.alarm_id,"},{"line_number":2564,"context_line":"                           on_behalf_of\u003dalarm.project_id))"},{"line_number":2565,"context_line":"            history_count +\u003d len(results)"},{"line_number":2566,"context_line":"        self.assertEqual(history_count, 0)"},{"line_number":2567,"context_line":""},{"line_number":2568,"context_line":""},{"line_number":2569,"context_line":"class AlarmTestPagination(AlarmTestBase,"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_fbf5f250","line":2566,"in_reply_to":"baada198_0e4f186c","updated":"2014-07-08 07:55:02.000000000","message":"Done.","commit_id":"704eb339fa270cd64bd2c14ce3526efdb288c8c5"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":2560,"context_line":"        history \u003d list(self.alarm_conn.query_alarm_history())"},{"line_number":2561,"context_line":"        self.assertEqual(count, len(history))"},{"line_number":2562,"context_line":""},{"line_number":2563,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2564,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2565,"context_line":"        self._clear_alarm_history(datetime.datetime(2013, 4, 7, 7, 30),"},{"line_number":2566,"context_line":"                                  1,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_0a09402b","line":2563,"updated":"2014-08-13 13:31:57.000000000","message":"Why mongodb driver is not listed here.","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":2566,"context_line":"                                  1,"},{"line_number":2567,"context_line":"                                  3)"},{"line_number":2568,"context_line":""},{"line_number":2569,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2570,"context_line":"    def test_clear_some_alarm_history(self):"},{"line_number":2571,"context_line":"        self._clear_alarm_history(datetime.datetime(2014, 4, 7, 7, 35),"},{"line_number":2572,"context_line":"                                  3 * 60,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_6a171c47","line":2569,"updated":"2014-08-13 13:31:57.000000000","message":"ditto","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":7729,"name":"Ilya Tyaptin","email":"ityaptin@mirantis.com","username":"ityaptin"},"change_message_id":"e35581fc28586dc6440f80056bfdafeeab67b426","unresolved":false,"context_lines":[{"line_number":2572,"context_line":"                                  3 * 60,"},{"line_number":2573,"context_line":"                                  1)"},{"line_number":2574,"context_line":""},{"line_number":2575,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2576,"context_line":"    def test_clear_all_alarm_history(self):"},{"line_number":2577,"context_line":"        self._clear_alarm_history(datetime.datetime(2014, 4, 7, 7, 45),"},{"line_number":2578,"context_line":"                                  3 * 60,"}],"source_content_type":"text/x-python","patch_set":14,"id":"baada198_0a206099","line":2575,"updated":"2014-08-13 13:31:57.000000000","message":"ditto","commit_id":"b17cefc30a923834bfdf0698e3cc4be89fb56d97"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":2539,"context_line":"        alarms \u003d list(self.alarm_conn.get_alarms())"},{"line_number":2540,"context_line":"        for alarm in alarms:"},{"line_number":2541,"context_line":"            i \u003d alarms.index(alarm)"},{"line_number":2542,"context_line":"            alarm_change \u003d dict(event_id\u003d("},{"line_number":2543,"context_line":"                                \"3e11800c-a3ca-4991-b34b-d97efb6047d%s\" % i),"},{"line_number":2544,"context_line":"                                alarm_id\u003dalarm.alarm_id,"},{"line_number":2545,"context_line":"                                type\u003dalarm_models.AlarmChange.CREATION,"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_c29e2b07","line":2542,"updated":"2014-12-01 03:48:52.000000000","message":"I think use\n\n    alarm_change \u003d {\n        \u0027event_id\u0027: ...\n    }\n\nis better, it is faster and L2550-L2552 can be in one line","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":2562,"context_line":""},{"line_number":2563,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2564,"context_line":"    def test_clear_alarm_history_no_data_to_remove(self):"},{"line_number":2565,"context_line":"        self._clear_alarm_history(datetime.datetime(2013, 4, 7, 7, 30),"},{"line_number":2566,"context_line":"                                  1,"},{"line_number":2567,"context_line":"                                  3)"},{"line_number":2568,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_028833c5","line":2565,"updated":"2014-12-01 03:48:52.000000000","message":"I think it is better to move first argument to a new line, then we can finish it in total two line, a bit cleaner..","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":2568,"context_line":""},{"line_number":2569,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2570,"context_line":"    def test_clear_some_alarm_history(self):"},{"line_number":2571,"context_line":"        self._clear_alarm_history(datetime.datetime(2014, 4, 7, 7, 35),"},{"line_number":2572,"context_line":"                                  3 * 60,"},{"line_number":2573,"context_line":"                                  1)"},{"line_number":2574,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_22836faa","line":2571,"updated":"2014-12-01 03:48:52.000000000","message":"ditto","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"36347ac643f37135042950526e296fc352530ce2","unresolved":false,"context_lines":[{"line_number":2574,"context_line":""},{"line_number":2575,"context_line":"    @tests_db.run_with(\u0027sqlite\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2576,"context_line":"    def test_clear_all_alarm_history(self):"},{"line_number":2577,"context_line":"        self._clear_alarm_history(datetime.datetime(2014, 4, 7, 7, 45),"},{"line_number":2578,"context_line":"                                  3 * 60,"},{"line_number":2579,"context_line":"                                  0)"},{"line_number":2580,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a890539_42923bf7","line":2577,"updated":"2014-12-01 03:48:52.000000000","message":"ditto","commit_id":"1eb00a3258ff87abb849cda45e451b40efc8576c"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"bfd432abf87e25fc19baaa0c01d5e799c36344a3","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"                         [i.name for i in page1])"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":""},{"line_number":2952,"context_line":"@tests_db.run_with(\u0027sqlite\u0027, \u0027mysql\u0027, \u0027pgsql\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2953,"context_line":"class AlarmHistoryTest(AlarmTestBase,"},{"line_number":2954,"context_line":"                       tests_db.MixinTestsWithBackendScenarios):"},{"line_number":2955,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_dc1a046e","line":2952,"updated":"2015-03-20 08:38:11.000000000","message":"Mongo is missing here.","commit_id":"107775209d28c485baa9aa46b35c778f74b8cbce"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0bab3ce55ce6543df0450735732a657f18376be7","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"                         [i.name for i in page1])"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":""},{"line_number":2952,"context_line":"@tests_db.run_with(\u0027sqlite\u0027, \u0027mysql\u0027, \u0027pgsql\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2953,"context_line":"class AlarmHistoryTest(AlarmTestBase,"},{"line_number":2954,"context_line":"                       tests_db.MixinTestsWithBackendScenarios):"},{"line_number":2955,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_b06487b3","line":2952,"in_reply_to":"9a80dd14_1c849c5c","updated":"2015-03-20 14:40:06.000000000","message":"why is db2 here then? they share the same base (for the most part)","commit_id":"107775209d28c485baa9aa46b35c778f74b8cbce"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"fa125c3fc8f982644acaaff8e3535a5c7c540838","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"                         [i.name for i in page1])"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":""},{"line_number":2952,"context_line":"@tests_db.run_with(\u0027sqlite\u0027, \u0027mysql\u0027, \u0027pgsql\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2953,"context_line":"class AlarmHistoryTest(AlarmTestBase,"},{"line_number":2954,"context_line":"                       tests_db.MixinTestsWithBackendScenarios):"},{"line_number":2955,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"7a75e904_6c3a0f38","line":2952,"in_reply_to":"9a80dd14_b06487b3","updated":"2015-03-21 02:44:41.000000000","message":"yes, they share the same base, except the clear expired data part....\n\nthe db2 doesn\u0027t implement any clear expired data method, so it always raise notimplementederror, then the test case passes (skipped)\n\nwe add db2 for most of the clear test case (maybe all IIRC), so here is same. If someone implement the clear expired data method, then he can directly run the ut to verify.\n\nOr I can remove all the db2 from all the clear test case, if you prefer to do in this patch\n\nthanks","commit_id":"107775209d28c485baa9aa46b35c778f74b8cbce"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"3314e8c9fb259a5e3ad5fcd444a31f5ee7534e40","unresolved":false,"context_lines":[{"line_number":2949,"context_line":"                         [i.name for i in page1])"},{"line_number":2950,"context_line":""},{"line_number":2951,"context_line":""},{"line_number":2952,"context_line":"@tests_db.run_with(\u0027sqlite\u0027, \u0027mysql\u0027, \u0027pgsql\u0027, \u0027hbase\u0027, \u0027db2\u0027)"},{"line_number":2953,"context_line":"class AlarmHistoryTest(AlarmTestBase,"},{"line_number":2954,"context_line":"                       tests_db.MixinTestsWithBackendScenarios):"},{"line_number":2955,"context_line":""}],"source_content_type":"text/x-python","patch_set":19,"id":"9a80dd14_1c849c5c","line":2952,"in_reply_to":"9a80dd14_dc1a046e","updated":"2015-03-20 08:41:02.000000000","message":"mongo is running in background which we cannot control so it is tested in test_impl_mongodb with ttl check","commit_id":"107775209d28c485baa9aa46b35c778f74b8cbce"}],"etc/ceilometer/ceilometer.conf.sample":[{"author":{"_account_id":6924,"name":"Pradeep Kilambi","email":"pkilambi@redhat.com","username":"pkilambi"},"change_message_id":"fb3871784f697d92b4274cad48fc7b5e006c86fc","unresolved":false,"context_lines":[{"line_number":684,"context_line":"# Number of seconds that alarm histories are kept"},{"line_number":685,"context_line":"# in the database for (\u003c\u003d 0 means forever). (integer value)"},{"line_number":686,"context_line":"#alarm_history_time_to_live\u003d-1"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"[dispatcher_file]"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAXH%2F%2F444%3D","line":687,"updated":"2014-04-16 17:13:51.000000000","message":"Is there a reason to have a separate ttl for this? could\u0027nt you just use the existing ttl we already have above? Do you foresee user wanting to clean up the alarm history at a different interval from the usual storage clean up ?","commit_id":"2b6ecda0212250823e4dc12ce88f81aedef6f211"},{"author":{"_account_id":8844,"name":"Mitsuru Kanabuchi","email":"kanabuchi.mitsuru@po.ntts.co.jp","username":"kanabuchi"},"change_message_id":"6c51243fd3dca7ab179977bb4c93b5b0591fe8f6","unresolved":false,"context_lines":[{"line_number":684,"context_line":"# Number of seconds that alarm histories are kept"},{"line_number":685,"context_line":"# in the database for (\u003c\u003d 0 means forever). (integer value)"},{"line_number":686,"context_line":"#alarm_history_time_to_live\u003d-1"},{"line_number":687,"context_line":""},{"line_number":688,"context_line":"[dispatcher_file]"},{"line_number":689,"context_line":""},{"line_number":690,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAXH%2F%2FzME%3D","line":687,"in_reply_to":"AAAAXH%2F%2F444%3D","updated":"2014-04-17 11:11:47.000000000","message":"The amount of alarm histories and samples are totally different.\nI assume that samples need to be expired more frequently than alarm histories.\nSo I separated those ttls.","commit_id":"2b6ecda0212250823e4dc12ce88f81aedef6f211"}]}
