)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae0613df25d57009432c730295e62e2e339c5650","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Current update model of scheduler host state has some issues. First, a"},{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_f66ed294","line":12,"range":{"start_line":11,"start_character":20,"end_line":12,"end_character":21},"updated":"2016-07-05 13:59:12.000000000","message":"nit: you said A \u003d B \u003d A.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0e4e7bbaeb98afb81e1c5b4da82a19b840bdb513","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Current update model of scheduler host state has some issues. First, a"},{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_73c3e6ed","line":12,"range":{"start_line":11,"start_character":20,"end_line":12,"end_character":21},"in_reply_to":"1aa78d24_f66ed294","updated":"2016-07-06 09:25:57.000000000","message":"Sorry, fat fingers. It\u0027s \"HostState.db_updated \u003d compute.update_at \u003d HostState.updated\"","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae0613df25d57009432c730295e62e2e339c5650","unresolved":false,"context_lines":[{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adds a timestamp to record when a host state cache is updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_5678862a","line":13,"range":{"start_line":13,"start_character":38,"end_line":13,"end_character":58},"updated":"2016-07-05 13:59:12.000000000","message":"not sure I understand this attribute.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"18b522091321ca9fb2fe0ff1edc506fa6b0c3708","unresolved":false,"context_lines":[{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adds a timestamp to record when a host state cache is updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_b301bcb1","line":13,"range":{"start_line":13,"start_character":38,"end_line":13,"end_character":58},"in_reply_to":"1aa78d24_250aa679","updated":"2016-07-06 14:13:25.000000000","message":"Yeah...it\u0027s not clear. `HostState.db_updated` is the timestamp of the db record it created from; And `HostState.updated` is its last modified time, recording its last time of in-memory modification.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0e4e7bbaeb98afb81e1c5b4da82a19b840bdb513","unresolved":false,"context_lines":[{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adds a timestamp to record when a host state cache is updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_56e69844","line":13,"range":{"start_line":13,"start_character":38,"end_line":13,"end_character":58},"in_reply_to":"1aa78d24_5678862a","updated":"2016-07-06 09:25:57.000000000","message":"\"HostState.db_updated \u003c compute.updated_at\" means this host state doesn\u0027t have the latest information because there\u0027s a newer compute record from db.\n\nThe host state should be updated, but actually it won\u0027t according to current implementation.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cee1ab9681f6604cc53e81fefbdbfad9e2c151e2","unresolved":false,"context_lines":[{"line_number":10,"context_line":"host state cache will be updated even if it is already the same with the"},{"line_number":11,"context_line":"latest db data(i.e. HostState.db_updated \u003d compute.updated_at \u003d"},{"line_number":12,"context_line":"HostState.db_updated). Second, the cache won\u0027t be updated even if db"},{"line_number":13,"context_line":"data is newer in a specific case(i.e. HostState.db_updated \u003c"},{"line_number":14,"context_line":"compute.updated_at \u003c HostState.updated)."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This patch adds a timestamp to record when a host state cache is updated"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_250aa679","line":13,"range":{"start_line":13,"start_character":38,"end_line":13,"end_character":58},"in_reply_to":"1aa78d24_56e69844","updated":"2016-07-06 13:21:48.000000000","message":"You don\u0027t really explain how the HostState.updated attribute can be different from the new HostState.db_updated attribute, only but for the first run.\nThat\u0027s where I\u0027m struggling trying to understand why a synchronous call could have a different case between those two.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"ae0613df25d57009432c730295e62e2e339c5650","unresolved":false,"context_lines":[{"line_number":28,"context_line":"to the losses of recent consumptions when refresh the host state,"},{"line_number":29,"context_line":"causing a worse impact from the bug #1341420. A detailed analysis can"},{"line_number":30,"context_line":"be found at https://bugs.launchpad.net/nova/+bug/1341420/comments/24"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"So the second issue is left unsolved because this leads to less"},{"line_number":33,"context_line":"consumption losses and thus can reduce retries to minimum in"},{"line_number":34,"context_line":"\u0027one scheduler instance per cell\u0027 scenario. It should be solved after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_d63c76e4","line":31,"updated":"2016-07-05 13:59:12.000000000","message":"Well, I understand why you want to merge that one, but I don\u0027t think it\u0027s really a problem, right? \nI mean, this bugfix will only make sure that if the cache is identical to the DB value, then we wouldn\u0027t update the HostState.\n\nIf so, FWIW, I\u0027d prefer to see fixing first the 2nd issue you explained, because it\u0027s a very main problem.\n\nTBH, I think that adding some kind of \"claims\" in the scheduler could help us refactoring _locked_update() so that it would maybe then possibly to also fix the #1 issue.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"18b522091321ca9fb2fe0ff1edc506fa6b0c3708","unresolved":false,"context_lines":[{"line_number":28,"context_line":"to the losses of recent consumptions when refresh the host state,"},{"line_number":29,"context_line":"causing a worse impact from the bug #1341420. A detailed analysis can"},{"line_number":30,"context_line":"be found at https://bugs.launchpad.net/nova/+bug/1341420/comments/24"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"So the second issue is left unsolved because this leads to less"},{"line_number":33,"context_line":"consumption losses and thus can reduce retries to minimum in"},{"line_number":34,"context_line":"\u0027one scheduler instance per cell\u0027 scenario. It should be solved after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_d350c834","line":31,"in_reply_to":"1aa78d24_05296a37","updated":"2016-07-06 14:13:25.000000000","message":"Agreed, maybe it is worthwhile to write a spec to explain the whole solution? I can split out the claim tracking part of the implementation.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"cee1ab9681f6604cc53e81fefbdbfad9e2c151e2","unresolved":false,"context_lines":[{"line_number":28,"context_line":"to the losses of recent consumptions when refresh the host state,"},{"line_number":29,"context_line":"causing a worse impact from the bug #1341420. A detailed analysis can"},{"line_number":30,"context_line":"be found at https://bugs.launchpad.net/nova/+bug/1341420/comments/24"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"So the second issue is left unsolved because this leads to less"},{"line_number":33,"context_line":"consumption losses and thus can reduce retries to minimum in"},{"line_number":34,"context_line":"\u0027one scheduler instance per cell\u0027 scenario. It should be solved after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_05296a37","line":31,"in_reply_to":"1aa78d24_a1f698f6","updated":"2016-07-06 13:21:48.000000000","message":"Right, I know about a possible outcome for the #2 problem, hence my point : maybe we should first implement the solution for that #2 issue, and then see if that\u0027s also fixing the #1 issue, or then modify the implementation to also fix #1.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"0e4e7bbaeb98afb81e1c5b4da82a19b840bdb513","unresolved":false,"context_lines":[{"line_number":28,"context_line":"to the losses of recent consumptions when refresh the host state,"},{"line_number":29,"context_line":"causing a worse impact from the bug #1341420. A detailed analysis can"},{"line_number":30,"context_line":"be found at https://bugs.launchpad.net/nova/+bug/1341420/comments/24"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"So the second issue is left unsolved because this leads to less"},{"line_number":33,"context_line":"consumption losses and thus can reduce retries to minimum in"},{"line_number":34,"context_line":"\u0027one scheduler instance per cell\u0027 scenario. It should be solved after"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"1aa78d24_a1f698f6","line":31,"in_reply_to":"1aa78d24_d63c76e4","updated":"2016-07-06 09:25:57.000000000","message":"Right, this patch is only a tiny fix.\n\nThe second is the main issue and is very complicated to fix. The case \"cache_db_updated \u003c compute_db_updated \u003c cache_updated\" means:\n\n  1. Compute record contains NEW information because cache is created from an older record.\n  2. Cache also contains NEW information because it has been updated by in-memory resource consumptions.\n\nThe above means whether we choose to update cache from the compute record or not are both WRONG, they both lead to information losts.\n\nI actually have a solution for issue#2, which is to track scheduler claims from schedulers to compute nodes, and it is already implemented in my prototype of eventually-consistent-scheduler-cache. Scheduler claim actually forms the incremental updates, which is part of the central idea in my design.","commit_id":"0603fc405fb1c2288b59e51a784a5b4c82bd7493"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"cd26fc2c35add6150ac19a31cc92448d6960fedb","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.ram_allocation_ratio \u003d None"},{"line_number":151,"context_line":"        self.cpu_allocation_ratio \u003d None"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.db_updated \u003d None"},{"line_number":154,"context_line":"        self.updated \u003d None"},{"line_number":155,"context_line":"        if compute:"},{"line_number":156,"context_line":"            self.update_from_compute_node(compute)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_ceddbb43","line":153,"updated":"2016-01-28 13:02:18.000000000","message":"Worth a comment to distinguish these two?","commit_id":"931f337796816bad2f3ab1d7d534177356bf05dc"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"577fb28be7535ce37a9e12d81f962ae2dcdb9e86","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        self.ram_allocation_ratio \u003d None"},{"line_number":151,"context_line":"        self.cpu_allocation_ratio \u003d None"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        self.db_updated \u003d None"},{"line_number":154,"context_line":"        self.updated \u003d None"},{"line_number":155,"context_line":"        if compute:"},{"line_number":156,"context_line":"            self.update_from_compute_node(compute)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_60f7c4f5","line":153,"in_reply_to":"7a5de9d1_ceddbb43","updated":"2016-01-29 03:14:51.000000000","message":"Done","commit_id":"931f337796816bad2f3ab1d7d534177356bf05dc"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"cd26fc2c35add6150ac19a31cc92448d6960fedb","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":162,"context_line":"        \"\"\"Update information about a host from a ComputeNode object.\"\"\""},{"line_number":163,"context_line":"        cache_db_updated \u003d self.db_updated"},{"line_number":164,"context_line":"        cache_updated \u003d self.updated"},{"line_number":165,"context_line":"        compute_db_updated \u003d compute.updated_at"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_8e4ca343","line":163,"updated":"2016-01-28 13:02:18.000000000","message":"This logic should also be applied to the ironic_host_manager. Currently it does not check the update timestamps at all, which seems to me to be a bug.\n\nHow about we separate the timing logic from the resource update, and only implement the resource update method in the IronicHostManager subclass.","commit_id":"931f337796816bad2f3ab1d7d534177356bf05dc"},{"author":{"_account_id":15648,"name":"Yingxin","email":"yingxin.cheng@intel.com","username":"Yingxin"},"change_message_id":"577fb28be7535ce37a9e12d81f962ae2dcdb9e86","unresolved":false,"context_lines":[{"line_number":160,"context_line":""},{"line_number":161,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":162,"context_line":"        \"\"\"Update information about a host from a ComputeNode object.\"\"\""},{"line_number":163,"context_line":"        cache_db_updated \u003d self.db_updated"},{"line_number":164,"context_line":"        cache_updated \u003d self.updated"},{"line_number":165,"context_line":"        compute_db_updated \u003d compute.updated_at"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_40cba8a5","line":163,"in_reply_to":"7a5de9d1_8e4ca343","updated":"2016-01-29 03:14:51.000000000","message":"Good point!","commit_id":"931f337796816bad2f3ab1d7d534177356bf05dc"}]}
