)]}'
{"networking_odl/common/config.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"969fc810d7079fe1e52a14967bbeabbdfb4612b7","unresolved":false,"context_lines":[{"line_number":57,"context_line":"               default\u003d\"/restconf/operational/neutron:neutron/hostconfigs\"),"},{"line_number":58,"context_line":"    cfg.IntOpt(\u0027restconf_poll_interval\u0027, default\u003d30,"},{"line_number":59,"context_line":"               help\u003d_(\"Poll interval in seconds for getting ODL hostconfig\")),"},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027journal_threads\u0027, default\u003d5,"},{"line_number":61,"context_line":"               help\u003d_(\"Number of journal threads.\")),"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_687ceab4","line":60,"range":{"start_line":60,"start_character":42,"end_line":60,"end_character":43},"updated":"2017-04-03 23:02:29.000000000","message":"Where does 5 come from?\nWe can just use system default. i.e. processes\u003dNone.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"902524425250c93341119b08aa5f4ae465450cd3","unresolved":false,"context_lines":[{"line_number":57,"context_line":"               default\u003d\"/restconf/operational/neutron:neutron/hostconfigs\"),"},{"line_number":58,"context_line":"    cfg.IntOpt(\u0027restconf_poll_interval\u0027, default\u003d30,"},{"line_number":59,"context_line":"               help\u003d_(\"Poll interval in seconds for getting ODL hostconfig\")),"},{"line_number":60,"context_line":"    cfg.IntOpt(\u0027journal_threads\u0027, default\u003d5,"},{"line_number":61,"context_line":"               help\u003d_(\"Number of journal threads.\")),"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_b7736eb1","line":60,"range":{"start_line":60,"start_character":42,"end_line":60,"end_character":43},"in_reply_to":"dfeb2761_687ceab4","updated":"2017-04-04 05:59:04.000000000","message":"It was just put to start discussion. I tried to pass process\u003dNone to ThreadPool but it does not accept process argument. Do you mean to something else? I tried like following\n\nfrom multiprocessing.dummy import pool as ThreadPool\nt \u003d ThreadPool(process\u003dNone) #fails at this step","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"}],"networking_odl/journal/journal.py":[{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"969fc810d7079fe1e52a14967bbeabbdfb4612b7","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.client \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":100,"context_line":"        self._odl_sync_timeout \u003d cfg.CONF.ml2_odl.sync_timeout"},{"line_number":101,"context_line":"        self._max_retry_count \u003d cfg.CONF.ml2_odl.retry_count"},{"line_number":102,"context_line":"        self.pool \u003d ThreadPool(cfg.CONF.ml2_odl.journal_threads)"},{"line_number":103,"context_line":"        self.event \u003d threading.Event()"},{"line_number":104,"context_line":"        self.lock \u003d threading.RLock()"},{"line_number":105,"context_line":"        self._thread_running \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_e35a5d28","line":102,"range":{"start_line":102,"start_character":0,"end_line":102,"end_character":17},"updated":"2017-04-03 23:02:29.000000000","message":"Needs to be class attribute?\nWe don\u0027t want to create multiple thread pool.\nMaybe singleton patch needs to be integrated into this patch.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"902524425250c93341119b08aa5f4ae465450cd3","unresolved":false,"context_lines":[{"line_number":99,"context_line":"        self.client \u003d client.OpenDaylightRestClient.create_client()"},{"line_number":100,"context_line":"        self._odl_sync_timeout \u003d cfg.CONF.ml2_odl.sync_timeout"},{"line_number":101,"context_line":"        self._max_retry_count \u003d cfg.CONF.ml2_odl.retry_count"},{"line_number":102,"context_line":"        self.pool \u003d ThreadPool(cfg.CONF.ml2_odl.journal_threads)"},{"line_number":103,"context_line":"        self.event \u003d threading.Event()"},{"line_number":104,"context_line":"        self.lock \u003d threading.RLock()"},{"line_number":105,"context_line":"        self._thread_running \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_375f5e0f","line":102,"range":{"start_line":102,"start_character":0,"end_line":102,"end_character":17},"in_reply_to":"dfeb2761_e35a5d28","updated":"2017-04-04 05:59:04.000000000","message":"yeah, it is on the top of singleton patch. I have cherry-pick those patches and added in depends-on as well.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"5b60f1683a7df2022232842f763ad9d7d3554580","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        LOG.debug(\"Starting a new sync thread\")"},{"line_number":110,"context_line":"        with self.lock:"},{"line_number":111,"context_line":"            if not self._thread_running:"},{"line_number":112,"context_line":"                self.pool.map(self.run_sync.thread)"},{"line_number":113,"context_line":"                self._start_sync_timer()"},{"line_number":114,"context_line":"                self._thread_running \u003d True"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_90d2d45b","line":112,"range":{"start_line":112,"start_character":30,"end_line":112,"end_character":50},"updated":"2017-04-03 10:32:50.000000000","message":"Needs to correct to self.run_sync_thread","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"969fc810d7079fe1e52a14967bbeabbdfb4612b7","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        LOG.debug(\"Starting a new sync thread\")"},{"line_number":110,"context_line":"        with self.lock:"},{"line_number":111,"context_line":"            if not self._thread_running:"},{"line_number":112,"context_line":"                self.pool.map(self.run_sync.thread)"},{"line_number":113,"context_line":"                self._start_sync_timer()"},{"line_number":114,"context_line":"                self._thread_running \u003d True"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def set_sync_event(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_a337b5e3","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":40},"updated":"2017-04-03 23:02:29.000000000","message":"This needs to be changed totally.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"902524425250c93341119b08aa5f4ae465450cd3","unresolved":false,"context_lines":[{"line_number":109,"context_line":"        LOG.debug(\"Starting a new sync thread\")"},{"line_number":110,"context_line":"        with self.lock:"},{"line_number":111,"context_line":"            if not self._thread_running:"},{"line_number":112,"context_line":"                self.pool.map(self.run_sync.thread)"},{"line_number":113,"context_line":"                self._start_sync_timer()"},{"line_number":114,"context_line":"                self._thread_running \u003d True"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def set_sync_event(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_d7ccb2bd","line":113,"range":{"start_line":112,"start_character":0,"end_line":113,"end_character":40},"in_reply_to":"dfeb2761_a337b5e3","updated":"2017-04-04 05:59:04.000000000","message":"I want to understand, what behavior is expected from this. Once i understood the scenario then i will code it.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"969fc810d7079fe1e52a14967bbeabbdfb4612b7","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            if self._thread_running:"},{"line_number":120,"context_line":"                self._timer.cancel()"},{"line_number":121,"context_line":"                self._start_sync_timer()"},{"line_number":122,"context_line":"        self.event.set()"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    def _start_sync_timer(self):"},{"line_number":125,"context_line":"        self._timer \u003d threading.Timer(self._odl_sync_timeout,"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_68550a1d","line":122,"range":{"start_line":122,"start_character":0,"end_line":122,"end_character":24},"updated":"2017-04-03 23:02:29.000000000","message":"we can invoke map after event.set()","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"969fc810d7079fe1e52a14967bbeabbdfb4612b7","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return method, urlpath, to_send"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def run_sync_thread(self, exit_after_run\u003dFalse):"},{"line_number":150,"context_line":"        while True:"},{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                self.event.wait()"},{"line_number":153,"context_line":"                self.event.clear()"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_2835c2f7","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":19},"updated":"2017-04-03 23:02:29.000000000","message":"We don\u0027t need loop anymore because threadpool takes care of it.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":13912,"name":"rajiv","email":"thenakliman@gmail.com","username":"rajiv.kumar"},"change_message_id":"902524425250c93341119b08aa5f4ae465450cd3","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return method, urlpath, to_send"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def run_sync_thread(self, exit_after_run\u003dFalse):"},{"line_number":150,"context_line":"        while True:"},{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                self.event.wait()"},{"line_number":153,"context_line":"                self.event.clear()"}],"source_content_type":"text/x-python","patch_set":1,"id":"dfeb2761_771de60d","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":19},"in_reply_to":"dfeb2761_2835c2f7","updated":"2017-04-04 05:59:04.000000000","message":"Do you mean that threads does not have to wait continuously once they completed the task of journal sync they should be returned back to the pool and Once an event is set by timer or by set_syn_event then assign the jobs to a thread in the pool. May be that\u0027s why you mentioned in previous comment that map after set event. is my understanding correct?","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"b007a3d7918998f5aac8afadc53debf5298f3107","unresolved":false,"context_lines":[{"line_number":147,"context_line":"        return method, urlpath, to_send"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"    def run_sync_thread(self, exit_after_run\u003dFalse):"},{"line_number":150,"context_line":"        while True:"},{"line_number":151,"context_line":"            try:"},{"line_number":152,"context_line":"                self.event.wait()"},{"line_number":153,"context_line":"                self.event.clear()"}],"source_content_type":"text/x-python","patch_set":1,"id":"7ffa3b31_77fabd42","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":19},"in_reply_to":"dfeb2761_771de60d","updated":"2017-04-17 15:27:07.000000000","message":"That\u0027s right. threadpool takes care of it. it dynamically creates/teardown on demand.\nSo we don\u0027t have to do it ourselves.","commit_id":"c3867d7978d551158a4fbb5fc23142e40b97ee06"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"ea78886b1a844f631e4587a89e7b1b3182ae8536","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self._timer.cancel()"},{"line_number":118,"context_line":"            self._start_sync_timer()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.pool.submit(self.sync_pending_entries)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _start_sync_timer(self):"},{"line_number":123,"context_line":"        self._timer \u003d threading.Timer(self._odl_sync_timeout,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5f201791_c079b8fc","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":51},"updated":"2017-06-22 08:34:36.000000000","message":"I believe there\u0027s no point in parallelizing the whole loop.\n\nThe entry selection code (get_oldest_pending_db_row_with_lock) is written such that only one single thread can actually execute it across an entire cloud (and with good reason, to support HA) so there\u0027s no point in parallelizing that piece of code.\n\nInstead I would suggest that you parallelize the handling of a single entry (i.e. lines 156-185) since they effectively don\u0027t have a problem being parallelized.","commit_id":"4c21cfe94874568a572b75a5a3550b8c5bc474cf"},{"author":{"_account_id":333,"name":"Isaku Yamahata","email":"isaku.yamahata@gmail.com","username":"yamahata"},"change_message_id":"a3ed746d08751334f28dce9a1d0db952c1b7919e","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self._timer.cancel()"},{"line_number":118,"context_line":"            self._start_sync_timer()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.pool.submit(self.sync_pending_entries)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _start_sync_timer(self):"},{"line_number":123,"context_line":"        self._timer \u003d threading.Timer(self._odl_sync_timeout,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff346bd7_d67d021d","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":51},"in_reply_to":"5f201791_c079b8fc","updated":"2017-07-24 18:16:36.000000000","message":"No, the method can get multiple entries. Especially for multiple tenants.\n\nIf you go to that road, we should have globally single journal thread.","commit_id":"4c21cfe94874568a572b75a5a3550b8c5bc474cf"},{"author":{"_account_id":7921,"name":"Mike Kolesnik","email":"mkolesni@redhat.com","username":"mkolesni"},"change_message_id":"542a7e2f7818631db6fd62d9ec087f583a1c6c2c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"            self._timer.cancel()"},{"line_number":118,"context_line":"            self._start_sync_timer()"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.pool.submit(self.sync_pending_entries)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _start_sync_timer(self):"},{"line_number":123,"context_line":"        self._timer \u003d threading.Timer(self._odl_sync_timeout,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ff346bd7_f4290d9b","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":51},"in_reply_to":"ff346bd7_d67d021d","updated":"2017-07-25 07:38:48.000000000","message":"Doesn\u0027t matter, we don\u0027t have a tenant concept in the journal so currently that query is a bottle neck everyone has to go though..\n\nWe could of course add the tenant concept which would then change the way the system works and allow us to maybe paralellize but i\u0027m afraid it might not be that simple because you could have shared resources that need to be taken into account.\n\nEither way, as the code is now written this is a single lock point across the cloud.","commit_id":"4c21cfe94874568a572b75a5a3550b8c5bc474cf"}]}
