)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"394edf9abdf340a7114b43c1f1f3052547a6f146","unresolved":false,"context_lines":[{"line_number":7122,"context_line":"                if self._sync_power_pool.free() \u003e 0:"},{"line_number":7123,"context_line":"                    self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_2893e1a4","line":7125,"range":{"start_line":7125,"start_character":60,"end_line":7125,"end_character":68},"updated":"2018-06-14 05:35:33.000000000","message":"typo","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"954956aa099d4cb9883fb016d32508d16ad9f5cb","unresolved":false,"context_lines":[{"line_number":7122,"context_line":"                if self._sync_power_pool.free() \u003e 0:"},{"line_number":7123,"context_line":"                    self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_48e658e9","line":7125,"range":{"start_line":7125,"start_character":60,"end_line":7125,"end_character":68},"in_reply_to":"5f7c97a3_2893e1a4","updated":"2018-06-18 05:38:53.000000000","message":"Done","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"394edf9abdf340a7114b43c1f1f3052547a6f146","unresolved":false,"context_lines":[{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":7130,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_e8b64925","line":7127,"range":{"start_line":7127,"start_character":21,"end_line":7127,"end_character":40},"updated":"2018-06-14 05:35:33.000000000","message":"don\u0027t know whether this kind of sleep then pass will lead to starvation, the instance that found after some threshold will be out of sync for long time ...\n\ndo we able to store them in an array and try again later after this main loop ?","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"88e903dd3c937244a10456e5cb2c46b81e10cba6","unresolved":false,"context_lines":[{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":7130,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_764c1cc8","line":7127,"range":{"start_line":7127,"start_character":21,"end_line":7127,"end_character":40},"in_reply_to":"5f7c97a3_4a8cd52d","updated":"2018-06-18 10:23:22.000000000","message":"I only think this might cause starvation because next time you might still don\u0027t have chance to sync because all greenthread occupied...","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"d85aa21d662c72f789c7223687b21041b233ac20","unresolved":false,"context_lines":[{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":7130,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_446281af","line":7127,"range":{"start_line":7127,"start_character":21,"end_line":7127,"end_character":40},"in_reply_to":"5f7c97a3_764c1cc8","updated":"2018-06-18 14:46:53.000000000","message":"that does not. it enables a context switch with the other threads that are running. so for example it will allow nova to spin up a new instances, or run another perioidc thread.","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"954956aa099d4cb9883fb016d32508d16ad9f5cb","unresolved":false,"context_lines":[{"line_number":7124,"context_line":"                else:"},{"line_number":7125,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skiiping \u0027"},{"line_number":7126,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7127,"context_line":"                    greenthread.sleep(1)"},{"line_number":7128,"context_line":""},{"line_number":7129,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":7130,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_4a8cd52d","line":7127,"range":{"start_line":7127,"start_character":21,"end_line":7127,"end_character":40},"in_reply_to":"5f7c97a3_e8b64925","updated":"2018-06-18 05:38:53.000000000","message":"i do not think that we need to store them and in the next iteration of the periodic task they will be taken care of.","commit_id":"03e06bb173d92a9ffda4614a25f8526d77cddd63"},{"author":{"_account_id":7156,"name":"Mathieu Gagné","email":"mgagne@calavera.ca","username":"mgagne"},"change_message_id":"d07a858659ffa35831c85680cfec3981f1159c97","unresolved":false,"context_lines":[{"line_number":7096,"context_line":"            #                They are set (in stop_instance) and read, in sync."},{"line_number":7097,"context_line":"            @utils.synchronized(db_instance.uuid)"},{"line_number":7098,"context_line":"            def query_driver_power_state_and_sync():"},{"line_number":7099,"context_line":"                self._syncs_in_progress[db_instance.uuid] \u003d True"},{"line_number":7100,"context_line":"                self._query_driver_power_state_and_sync(context, db_instance)"},{"line_number":7101,"context_line":""},{"line_number":7102,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_45a5b19e","line":7099,"updated":"2018-06-28 20:53:38.000000000","message":"I\u0027m not sure I fully understand why it got moved within the greenthread in a synchronized block? The commit message doesn\u0027t explain well why this is needed in additional to the call to free() below.","commit_id":"03d71aafdc4b500abfae58053fc069bc88e322b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e75d068fbe6516655d3579c3c8485b720e49720b","unresolved":false,"context_lines":[{"line_number":7096,"context_line":"            #                They are set (in stop_instance) and read, in sync."},{"line_number":7097,"context_line":"            @utils.synchronized(db_instance.uuid)"},{"line_number":7098,"context_line":"            def query_driver_power_state_and_sync():"},{"line_number":7099,"context_line":"                self._syncs_in_progress[db_instance.uuid] \u003d True"},{"line_number":7100,"context_line":"                self._query_driver_power_state_and_sync(context, db_instance)"},{"line_number":7101,"context_line":""},{"line_number":7102,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_c16e1f95","line":7099,"in_reply_to":"5f7c97a3_45a5b19e","updated":"2018-07-05 11:41:06.000000000","message":"I will add this","commit_id":"03d71aafdc4b500abfae58053fc069bc88e322b6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"bbe811ab24647b647df11acba05eb7c12e7518a8","unresolved":false,"context_lines":[{"line_number":7119,"context_line":"                if self._sync_power_pool.free() \u003e 0:"},{"line_number":7120,"context_line":"                    self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":7121,"context_line":"                else:"},{"line_number":7122,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skipping \u0027"},{"line_number":7123,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7124,"context_line":"                # Allow switching of greenthreads between power syncs."},{"line_number":7125,"context_line":"                greenthread.sleep(0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_0506d9ce","line":7122,"updated":"2018-06-28 20:45:36.000000000","message":"I would mention in here that if this is a recurring issue, to consider changing the \"sync_power_state_pool_size\" config option value.","commit_id":"03d71aafdc4b500abfae58053fc069bc88e322b6"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e75d068fbe6516655d3579c3c8485b720e49720b","unresolved":false,"context_lines":[{"line_number":7119,"context_line":"                if self._sync_power_pool.free() \u003e 0:"},{"line_number":7120,"context_line":"                    self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":7121,"context_line":"                else:"},{"line_number":7122,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skipping \u0027"},{"line_number":7123,"context_line":"                                \u0027instance %s\u0027, uuid)"},{"line_number":7124,"context_line":"                # Allow switching of greenthreads between power syncs."},{"line_number":7125,"context_line":"                greenthread.sleep(0)"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_61670bba","line":7122,"in_reply_to":"5f7c97a3_0506d9ce","updated":"2018-07-05 11:41:06.000000000","message":"Done","commit_id":"03d71aafdc4b500abfae58053fc069bc88e322b6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eadcb377fe026829a086932add113339190f44f4","unresolved":false,"context_lines":[{"line_number":7115,"context_line":"                LOG.debug(\u0027Sync already in progress for %s\u0027, uuid)"},{"line_number":7116,"context_line":"            else:"},{"line_number":7117,"context_line":"                LOG.debug(\u0027Triggering sync for uuid %s\u0027, uuid)"},{"line_number":7118,"context_line":"                self._syncs_in_progress[uuid] \u003d True"},{"line_number":7119,"context_line":"                self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":7120,"context_line":""},{"line_number":7121,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_6308402c","side":"PARENT","line":7118,"updated":"2019-11-22 18:07:18.000000000","message":"I am not sure we should move this... If the instance uuid lock is help by some other process, we will backing up loads of threads for a single instance on each loop.\n\nI know what you mean about there being the chance _sync is never called, but I think exhasting the pool with someone waiting on the lock seems bad too.\n\nI would prefer if we treat this move as a separate change, and I think the rest of this fix is worth while.","commit_id":"dee92e6876cec8d3db23d54cccd7a1dec851a593"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"a840c4276fdffccbbb370b8873cc27c09b8b2035","unresolved":false,"context_lines":[{"line_number":9327,"context_line":"                if self._sync_power_pool.free() \u003e 0:"},{"line_number":9328,"context_line":"                    self._syncs_in_progress[uuid] \u003d True"},{"line_number":9329,"context_line":"                    self._sync_power_pool.spawn_n(_sync, db_instance)"},{"line_number":9330,"context_line":"                else:"},{"line_number":9331,"context_line":"                    LOG.warning(\u0027Power sync pool exhausted. Skipping \u0027"},{"line_number":9332,"context_line":"                                \u0027instance %s. Consider increasing \u0027"},{"line_number":9333,"context_line":"                                \u0027\"sync_power_state_pool_size\" if this \u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"df33271e_59bfabcf","line":9330,"updated":"2020-03-25 11:00:43.000000000","message":"You know... I think this now means we just have instances that never get the power state sync. We really need to order by the longest time sync last power state sync, or something like that...","commit_id":"884ffa7072a754bbd37ea063c84a5cc56a56c8e0"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"34809c19424ac87ec80546a92d5c404a8f8430fa","unresolved":false,"context_lines":[{"line_number":9323,"context_line":"            if uuid in self._syncs_in_progress:"},{"line_number":9324,"context_line":"                LOG.debug(\u0027Sync already in progress for %s\u0027, uuid)"},{"line_number":9325,"context_line":"            else:"},{"line_number":9326,"context_line":"                # Wait for previous power sync to complete"},{"line_number":9327,"context_line":"                while self._sync_power_pool.free() \u003c\u003d 0"},{"line_number":9328,"context_line":"                    LOG.debug(\u0027Power sync pool exhausted. \u0027"},{"line_number":9329,"context_line":"                              \u0027Waiting to sync %s\u0027, uuid)"},{"line_number":9330,"context_line":"                    greenthread.sleep(10)"},{"line_number":9331,"context_line":""},{"line_number":9332,"context_line":"                LOG.debug(\u0027Triggering sync for uuid %s\u0027, uuid)"},{"line_number":9333,"context_line":"                self._syncs_in_progress[uuid] \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_df39db3f","line":9330,"range":{"start_line":9326,"start_character":0,"end_line":9330,"end_character":41},"updated":"2020-03-25 13:26:53.000000000","message":"How this is logically different from the baseline behavior where in such case the code would wait on the spawn_n() call? Or did I miss something?","commit_id":"1acb5705a19835a0ff249d7e66669b290cc7f255"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eef7184485ef5f4c31bec506885733113997366c","unresolved":false,"context_lines":[{"line_number":9323,"context_line":"            if uuid in self._syncs_in_progress:"},{"line_number":9324,"context_line":"                LOG.debug(\u0027Sync already in progress for %s\u0027, uuid)"},{"line_number":9325,"context_line":"            else:"},{"line_number":9326,"context_line":"                # Wait for previous power sync to complete"},{"line_number":9327,"context_line":"                while self._sync_power_pool.free() \u003c\u003d 0"},{"line_number":9328,"context_line":"                    LOG.debug(\u0027Power sync pool exhausted. \u0027"},{"line_number":9329,"context_line":"                              \u0027Waiting to sync %s\u0027, uuid)"},{"line_number":9330,"context_line":"                    greenthread.sleep(10)"},{"line_number":9331,"context_line":""},{"line_number":9332,"context_line":"                LOG.debug(\u0027Triggering sync for uuid %s\u0027, uuid)"},{"line_number":9333,"context_line":"                self._syncs_in_progress[uuid] \u003d True"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_8d2ba9e9","line":9330,"range":{"start_line":9326,"start_character":0,"end_line":9330,"end_character":41},"in_reply_to":"df33271e_df39db3f","updated":"2020-03-25 15:00:20.000000000","message":"maybe its not... :/\n\nBut the skip alternative seems bad too.","commit_id":"1acb5705a19835a0ff249d7e66669b290cc7f255"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"34809c19424ac87ec80546a92d5c404a8f8430fa","unresolved":false,"context_lines":[{"line_number":9335,"context_line":""},{"line_number":9336,"context_line":"            # Allow switching of greenthreads between instances"},{"line_number":9337,"context_line":"            # to keep other periodic tasks going"},{"line_number":9338,"context_line":"            greenthread.sleep(0)"},{"line_number":9339,"context_line":""},{"line_number":9340,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":9341,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_7f140fa1","line":9338,"updated":"2020-03-25 13:26:53.000000000","message":"This feels OK. But I don\u0027t see what was the long running operation in this loop that warrants the need of an explicit yield.","commit_id":"1acb5705a19835a0ff249d7e66669b290cc7f255"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"eef7184485ef5f4c31bec506885733113997366c","unresolved":false,"context_lines":[{"line_number":9335,"context_line":""},{"line_number":9336,"context_line":"            # Allow switching of greenthreads between instances"},{"line_number":9337,"context_line":"            # to keep other periodic tasks going"},{"line_number":9338,"context_line":"            greenthread.sleep(0)"},{"line_number":9339,"context_line":""},{"line_number":9340,"context_line":"    def _query_driver_power_state_and_sync(self, context, db_instance):"},{"line_number":9341,"context_line":"        if db_instance.task_state is not None:"}],"source_content_type":"text/x-python","patch_set":7,"id":"df33271e_cd5c9180","line":9338,"in_reply_to":"df33271e_7f140fa1","updated":"2020-03-25 15:00:20.000000000","message":"the loop can be quite long running, it was left from the original patch. Not sure its worth it.","commit_id":"1acb5705a19835a0ff249d7e66669b290cc7f255"}]}
