)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"7da1649b9b9ffca57d611ca21c8e1572e3c0b0e7","unresolved":false,"context_lines":[{"line_number":13,"context_line":"4. then we update alarm A with alarm_ids \u003d B"},{"line_number":14,"context_line":"5. then when evaluator alarm state, the two combination alarm is a dead loop"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We should avoid such secnarios"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bad4c104_2f6aa01a","line":16,"range":{"start_line":16,"start_character":21,"end_line":16,"end_character":30},"updated":"2014-04-29 19:31:15.000000000","message":"typo: scenarios","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":13,"context_line":"4. then we update alarm A with alarm_ids \u003d B"},{"line_number":14,"context_line":"5. then when evaluator alarm state, the two combination alarm is a dead loop"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We should avoid such secnarios"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7adec928_94dfdc0c","line":16,"in_reply_to":"bad4c104_2f6aa01a","updated":"2014-05-15 06:21:46.000000000","message":"Done","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"7da1649b9b9ffca57d611ca21c8e1572e3c0b0e7","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We should avoid such secnarios"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"},{"line_number":20,"context_line":"  so there is no dead loop"},{"line_number":21,"context_line":"* all alarms only depend on good alarms are good alarms"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bad4c104_cf5a1483","line":18,"updated":"2014-04-29 19:31:15.000000000","message":"possibly it\u0027ll be better \"that\"-\u003e\"the following\"","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":"We should avoid such secnarios"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"},{"line_number":20,"context_line":"  so there is no dead loop"},{"line_number":21,"context_line":"* all alarms only depend on good alarms are good alarms"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7adec928_d4e5e4dc","line":18,"in_reply_to":"bad4c104_cf5a1483","updated":"2014-05-15 06:21:46.000000000","message":"Done","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"7da1649b9b9ffca57d611ca21c8e1572e3c0b0e7","unresolved":false,"context_lines":[{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"},{"line_number":20,"context_line":"  so there is no dead loop"},{"line_number":21,"context_line":"* all alarms only depend on good alarms are good alarms"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Note that we can update an alarm with enabled\u003dFalse, in such case, no matter"},{"line_number":24,"context_line":"there is a dead loop or not, we will allow it, since it will not be evaluated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"bad4c104_efd6f8c4","line":21,"updated":"2014-04-29 19:31:15.000000000","message":"\"only depend\" -\u003e \"depending only\"","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":18,"context_line":"The basic idea is that:"},{"line_number":19,"context_line":"* all threshold alarms are good alarm, which definitely have no dependency,"},{"line_number":20,"context_line":"  so there is no dead loop"},{"line_number":21,"context_line":"* all alarms only depend on good alarms are good alarms"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Note that we can update an alarm with enabled\u003dFalse, in such case, no matter"},{"line_number":24,"context_line":"there is a dead loop or not, we will allow it, since it will not be evaluated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"7adec928_f4eae0aa","line":21,"in_reply_to":"bad4c104_efd6f8c4","updated":"2014-05-15 06:21:46.000000000","message":"Done","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"}],"ceilometer/api/controllers/v2.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"85d895895536294f39cd9485256538be492a3788","unresolved":false,"context_lines":[{"line_number":1941,"context_line":"        # if we modify alarm_ids of combination alarm, we should check the"},{"line_number":1942,"context_line":"        # dependency to avoid dead loop when evaluate alarm"},{"line_number":1943,"context_line":"        # change alarm to disabled will ignore the dead loop check"},{"line_number":1944,"context_line":"        if data.type \u003d\u003d \u0027combination\u0027 and data.enabled:"},{"line_number":1945,"context_line":"            old_ids \u003d old_alarm[\u0027rule\u0027][\u0027alarm_ids\u0027]"},{"line_number":1946,"context_line":"            updated_ids \u003d updated_alarm[\u0027rule\u0027][\u0027alarm_ids\u0027]"},{"line_number":1947,"context_line":"            # if alarm previously is disabled, then we should check dead loop"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FwZY%3D","line":1944,"updated":"2014-04-28 08:01:28.000000000","message":"Why we don\u0027t check the dead loop when disabled? I think we should check them no matter it\u0027s enabled or disabled. Dead loop alarms are not legal.","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":1941,"context_line":"        # if we modify alarm_ids of combination alarm, we should check the"},{"line_number":1942,"context_line":"        # dependency to avoid dead loop when evaluate alarm"},{"line_number":1943,"context_line":"        # change alarm to disabled will ignore the dead loop check"},{"line_number":1944,"context_line":"        if data.type \u003d\u003d \u0027combination\u0027 and data.enabled:"},{"line_number":1945,"context_line":"            old_ids \u003d old_alarm[\u0027rule\u0027][\u0027alarm_ids\u0027]"},{"line_number":1946,"context_line":"            updated_ids \u003d updated_alarm[\u0027rule\u0027][\u0027alarm_ids\u0027]"},{"line_number":1947,"context_line":"            # if alarm previously is disabled, then we should check dead loop"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_54c2b434","line":1944,"in_reply_to":"AAAAXX%2F%2FwZY%3D","updated":"2014-05-15 06:21:46.000000000","message":"the first draft actually did what you said. But if an alarm is disabled, it will not be evaluated, so I think it should not be so strict, if user enable it again, it will check the dead loop and warn the user.","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"825f1a3365bc138b072f5a4b8be3eb0a50497062","unresolved":false,"context_lines":[{"line_number":1970,"context_line":"        alarms \u003d [Alarm.from_db_model(alarm) for alarm in alarms]"},{"line_number":1971,"context_line":"        # new_alarm may change the type and alarm_ids, so we must update it"},{"line_number":1972,"context_line":"        for idx in range(len(alarms)):"},{"line_number":1973,"context_line":"            if alarms[idx].alarm_id \u003d\u003d new_alarm.alarm_id:"},{"line_number":1974,"context_line":"                alarms[idx] \u003d new_alarm"},{"line_number":1975,"context_line":"                break"},{"line_number":1976,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_541e34bc","line":1973,"updated":"2014-05-15 06:47:38.000000000","message":"this place need get all alarms instead of certain type, because an alarm can be changed from threshold to combination","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"85d895895536294f39cd9485256538be492a3788","unresolved":false,"context_lines":[{"line_number":1975,"context_line":"                break"},{"line_number":1976,"context_line":""},{"line_number":1977,"context_line":"        combination_alarms \u003d set([alarm for alarm in alarms"},{"line_number":1978,"context_line":"                                  if alarm.type \u003d\u003d \u0027combination\u0027])"},{"line_number":1979,"context_line":"        # good alarms has no dead loop in their dependency"},{"line_number":1980,"context_line":"        good_alarms \u003d set(alarms) - combination_alarms"},{"line_number":1981,"context_line":"        good_alarms \u003d set([alarm.alarm_id for alarm in good_alarms])"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FwZ4%3D","line":1978,"updated":"2014-04-28 08:01:28.000000000","message":"Instead of getting all the alarms and separate them into combination and threshold types on the client side, could we enhance the storage db\u0027s get_alarms() interface to return only certain types of alarms? Because the threshold alarms are all \u0027good alarms\u0027 by default, there is no need to retrieve them.","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":3012,"name":"Dina Belova","email":"dbelova@mirantis.com","username":"dbelova"},"change_message_id":"7da1649b9b9ffca57d611ca21c8e1572e3c0b0e7","unresolved":false,"context_lines":[{"line_number":1975,"context_line":"                break"},{"line_number":1976,"context_line":""},{"line_number":1977,"context_line":"        combination_alarms \u003d set([alarm for alarm in alarms"},{"line_number":1978,"context_line":"                                  if alarm.type \u003d\u003d \u0027combination\u0027])"},{"line_number":1979,"context_line":"        # good alarms has no dead loop in their dependency"},{"line_number":1980,"context_line":"        good_alarms \u003d set(alarms) - combination_alarms"},{"line_number":1981,"context_line":"        good_alarms \u003d set([alarm.alarm_id for alarm in good_alarms])"}],"source_content_type":"text/x-python","patch_set":3,"id":"bad4c104_2f5b8055","line":1978,"in_reply_to":"AAAAXX%2F%2FwZ4%3D","updated":"2014-04-29 19:31:15.000000000","message":"Quite agree here, it\u0027ll will look much cleaner. While to the storage code it\u0027ll look like\n\n\nif type is not None:\n            query \u003d query.filter(models.Alarm.type \u003d\u003d type)\n\n\nquite nice I guess","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":1975,"context_line":"                break"},{"line_number":1976,"context_line":""},{"line_number":1977,"context_line":"        combination_alarms \u003d set([alarm for alarm in alarms"},{"line_number":1978,"context_line":"                                  if alarm.type \u003d\u003d \u0027combination\u0027])"},{"line_number":1979,"context_line":"        # good alarms has no dead loop in their dependency"},{"line_number":1980,"context_line":"        good_alarms \u003d set(alarms) - combination_alarms"},{"line_number":1981,"context_line":"        good_alarms \u003d set([alarm.alarm_id for alarm in good_alarms])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_f40ca03d","line":1978,"in_reply_to":"AAAAXX%2F%2FwZ4%3D","updated":"2014-05-15 06:21:46.000000000","message":"done in https://review.openstack.org/#/c/93658/","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"825f1a3365bc138b072f5a4b8be3eb0a50497062","unresolved":false,"context_lines":[{"line_number":1975,"context_line":"                break"},{"line_number":1976,"context_line":""},{"line_number":1977,"context_line":"        combination_alarms \u003d set([alarm for alarm in alarms"},{"line_number":1978,"context_line":"                                  if alarm.type \u003d\u003d \u0027combination\u0027])"},{"line_number":1979,"context_line":"        # good alarms has no dead loop in their dependency"},{"line_number":1980,"context_line":"        good_alarms \u003d set(alarms) - combination_alarms"},{"line_number":1981,"context_line":"        good_alarms \u003d set([alarm.alarm_id for alarm in good_alarms])"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_146f4c2c","line":1978,"in_reply_to":"AAAAXX%2F%2FwZ4%3D","updated":"2014-05-15 06:47:38.000000000","message":"this place can use the new filter \u0027type\u0027, but since all alarm has already been retrieved in L1970, it has no need to retrieve from database again","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"825f1a3365bc138b072f5a4b8be3eb0a50497062","unresolved":false,"context_lines":[{"line_number":1977,"context_line":"        combination_alarms \u003d set([alarm for alarm in alarms"},{"line_number":1978,"context_line":"                                  if alarm.type \u003d\u003d \u0027combination\u0027])"},{"line_number":1979,"context_line":"        # good alarms has no dead loop in their dependency"},{"line_number":1980,"context_line":"        good_alarms \u003d set(alarms) - combination_alarms"},{"line_number":1981,"context_line":"        good_alarms \u003d set([alarm.alarm_id for alarm in good_alarms])"},{"line_number":1982,"context_line":"        while combination_alarms:"},{"line_number":1983,"context_line":"            new_good_alarms \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_14282ce1","line":1980,"updated":"2014-05-15 06:47:38.000000000","message":"this place must do (all alarms - conbination alarms), because an alarm can be changed from threshold to combination, if we get threshold alarm from database directly, then itself will be a good alarm, then other alarms depending only on it will be good too, actually, it can be wrong, because it has not been checked yet.","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"825f1a3365bc138b072f5a4b8be3eb0a50497062","unresolved":false,"context_lines":[{"line_number":1983,"context_line":"            new_good_alarms \u003d []"},{"line_number":1984,"context_line":"            for alarm in combination_alarms:"},{"line_number":1985,"context_line":"                for alarm_id in alarm.combination_rule.alarm_ids:"},{"line_number":1986,"context_line":"                    if alarm_id not in good_alarms:"},{"line_number":1987,"context_line":"                        break"},{"line_number":1988,"context_line":"                else:"},{"line_number":1989,"context_line":"                    new_good_alarms.append(alarm)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_744410b7","line":1986,"updated":"2014-05-15 06:47:38.000000000","message":"this place needs threshold alarms when the first loop is executed","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"85d895895536294f39cd9485256538be492a3788","unresolved":false,"context_lines":[{"line_number":2093,"context_line":"        payload[\u0027detail\u0027] \u003d scrubbed_data"},{"line_number":2094,"context_line":"        _send_notification(type, payload)"},{"line_number":2095,"context_line":""},{"line_number":2096,"context_line":"    @wsme_pecan.wsexpose(Alarm, body\u003dAlarm, status_code\u003d201)"},{"line_number":2097,"context_line":"    def post(self, data):"},{"line_number":2098,"context_line":"        \"\"\"Create a new alarm."},{"line_number":2099,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAXX%2F%2FwYs%3D","line":2096,"updated":"2014-04-28 08:01:28.000000000","message":"Do we need to check the dead loop here too?","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"},{"author":{"_account_id":6676,"name":"zqfan","email":"aji.zqfan@gmail.com","username":"aji-zqfan"},"change_message_id":"04cb76e150238b0b17a0951b35e5b0aad01eebe0","unresolved":false,"context_lines":[{"line_number":2093,"context_line":"        payload[\u0027detail\u0027] \u003d scrubbed_data"},{"line_number":2094,"context_line":"        _send_notification(type, payload)"},{"line_number":2095,"context_line":""},{"line_number":2096,"context_line":"    @wsme_pecan.wsexpose(Alarm, body\u003dAlarm, status_code\u003d201)"},{"line_number":2097,"context_line":"    def post(self, data):"},{"line_number":2098,"context_line":"        \"\"\"Create a new alarm."},{"line_number":2099,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_b196aa3d","line":2096,"in_reply_to":"AAAAXX%2F%2FwYs%3D","updated":"2014-05-15 06:21:46.000000000","message":"no, because all new created alarms cannot cause dead loop, image a directed graph, a new alarm is a new vertex, all existent vertexs cannot point to it when it is introduced, so, there cannot be dead loop when post","commit_id":"065bff48a5e2c9af33b42fc0c672be18f8e05507"}]}
