)]}'
{"mistral/db/v2/api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":332,"context_line":"    return IMPL.get_incomplete_task_executions_count(**kwargs)"},{"line_number":333,"context_line":""},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"def get_tasks_executions_by_name(**kwargs):"},{"line_number":336,"context_line":"    return IMPL.get_tasks_executions_by_name(**kwargs)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_0ed6b950","line":335,"range":{"start_line":335,"start_character":28,"end_line":335,"end_character":32},"updated":"2019-04-17 09:08:38.000000000","message":"-\u003e by_names","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"def get_tasks_executions_by_name(**kwargs):"},{"line_number":336,"context_line":"    return IMPL.get_tasks_executions_by_name(**kwargs)"},{"line_number":337,"context_line":""},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"def create_task_execution(values):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_aecc45bc","line":336,"range":{"start_line":336,"start_character":40,"end_line":336,"end_character":44},"updated":"2019-04-17 09:08:38.000000000","message":"same","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"}],"mistral/db/v2/sqlalchemy/api.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"@b.session_aware()"},{"line_number":1005,"context_line":"def get_tasks_executions_by_name(session\u003dNone, workflow_execution_id\u003dNone, names\u003dNone):"},{"line_number":1006,"context_line":"    #columns \u003d ["},{"line_number":1007,"context_line":"    #    models.TaskExecution.id,"},{"line_number":1008,"context_line":"    #    models.TaskExecution.name,"},{"line_number":1009,"context_line":"    #    models.TaskExecution.state"},{"line_number":1010,"context_line":"    #]"},{"line_number":1011,"context_line":"    query \u003d b.model_query(models.TaskExecution)"},{"line_number":1012,"context_line":"    query \u003d db_filters.apply_filters("},{"line_number":1013,"context_line":"        query,"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_8e462921","line":1010,"range":{"start_line":1006,"start_character":4,"end_line":1010,"end_character":6},"updated":"2019-04-17 09:08:38.000000000","message":"We need to fetch only these columns, yes. Is there any problem with that?","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"}],"mistral/workflow/base.py":[{"author":{"_account_id":29124,"name":"Oleg Ovcharuk","email":"vgvoleg@gmail.com","username":"vgvoleg"},"change_message_id":"47e83a30ae2896c58c64c6720f9eef6ea2b84379","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            return []"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if reset:"},{"line_number":148,"context_line":"            self._clean_task_execution_cache()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        cmds \u003d ["},{"line_number":151,"context_line":"            commands.RunExistingTask(self.wf_ex, self.wf_spec, t_e, reset,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_85d75524","line":148,"updated":"2019-05-17 08:28:06.000000000","message":"It is really important to clear this cache in all engine instances in case of HA configuration.","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"8512b887538fe1f082026c5a680396e1ad540739","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            return []"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if reset:"},{"line_number":148,"context_line":"            self._clean_task_execution_cache()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        cmds \u003d ["},{"line_number":151,"context_line":"            commands.RunExistingTask(self.wf_ex, self.wf_spec, t_e, reset,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_839aedc2","line":148,"in_reply_to":"bfb3d3c7_08f5bccb","updated":"2019-05-17 10:27:58.000000000","message":"Yes, having cache here is kind of useless. As Renat said it will be a local variable in the next PS.","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"aaa955763ac4a0f540145549627258236a01fcaf","unresolved":false,"context_lines":[{"line_number":145,"context_line":"            return []"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if reset:"},{"line_number":148,"context_line":"            self._clean_task_execution_cache()"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        cmds \u003d ["},{"line_number":151,"context_line":"            commands.RunExistingTask(self.wf_ex, self.wf_spec, t_e, reset,"}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_08f5bccb","line":148,"in_reply_to":"bfb3d3c7_85d75524","updated":"2019-05-17 09:25:26.000000000","message":"Oleg, no. We\u0027ve discussed it with Misha and we could have made it actually a local variable. We create a new instance of a controller every time we need it. My point is: this cache life time is always very short, it lives basically only during a single operation.","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"}],"mistral/workflow/direct_workflow.py":[{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_TASK_EX_CACHE \u003d cachetools.LRUCache(maxsize\u003d100)"},{"line_number":34,"context_line":"_TASK_EX_CACHE_LOCK \u003d threading.RLock()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class DirectWorkflowController(base.WorkflowController):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_aef3e509","line":33,"range":{"start_line":33,"start_character":0,"end_line":33,"end_character":14},"updated":"2019-04-17 09:08:38.000000000","message":"I\u0027d just use a regular dictionary and make a local object. It\u0027s needed only in one thread during one call. The query that fetches all task executions by names (more precisely, their state) will be light enough so IMO there\u0027s need to cache anything between for further calls.\nAlso, if we make it a regular local dict we won\u0027t need any methods that invalidate/clear something.","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":31,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"_TASK_EX_CACHE \u003d cachetools.LRUCache(maxsize\u003d100)"},{"line_number":34,"context_line":"_TASK_EX_CACHE_LOCK \u003d threading.RLock()"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class DirectWorkflowController(base.WorkflowController):"},{"line_number":37,"context_line":"    \"\"\"\u0027Direct workflow\u0027 controller."}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_ae7e8568","line":34,"range":{"start_line":34,"start_character":0,"end_line":34,"end_character":19},"updated":"2019-04-17 09:08:38.000000000","message":"Lock is not needed here because the cache will be accessed from the same thread.","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"53245d6eb62c46129c7089dda607b0298e17a602","unresolved":false,"context_lines":[{"line_number":554,"context_line":"        if t_ex:"},{"line_number":555,"context_line":"            return t_ex"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"        t_execs \u003d db_api.get_tasks_executions_by_name("},{"line_number":558,"context_line":"            workflow_execution_id\u003dself.wf_ex.id,"},{"line_number":559,"context_line":"            names\u003d[t_name]"},{"line_number":560,"context_line":"        )"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fce034c_cea8b1dc","line":557,"range":{"start_line":557,"start_character":33,"end_line":557,"end_character":34},"updated":"2019-04-17 09:08:38.000000000","message":"Remove \"s\" from the name.","commit_id":"8c6dac4a69061370eda93e51eb5e23b0c458a33c"},{"author":{"_account_id":29124,"name":"Oleg Ovcharuk","email":"vgvoleg@gmail.com","username":"vgvoleg"},"change_message_id":"24e62ef1ee2df03190dd4ebe59d4babfdba3267a","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        while inbound_specs:"},{"line_number":574,"context_line":"            spec \u003d inbound_specs.pop()"},{"line_number":575,"context_line":"            all_parent_names.add(spec.get_name())"},{"line_number":576,"context_line":"            inbound_specs +\u003d self.wf_spec.find_inbound_task_specs(spec)[:]"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        return all_parent_names"},{"line_number":579,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_8503d50d","line":576,"updated":"2019-05-17 08:03:04.000000000","message":"Is there any need to copy added array?","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"},{"author":{"_account_id":11391,"name":"Mikhail Fedosin","email":"mfedosin@redhat.com","username":"fedosinme"},"change_message_id":"8512b887538fe1f082026c5a680396e1ad540739","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        while inbound_specs:"},{"line_number":574,"context_line":"            spec \u003d inbound_specs.pop()"},{"line_number":575,"context_line":"            all_parent_names.add(spec.get_name())"},{"line_number":576,"context_line":"            inbound_specs +\u003d self.wf_spec.find_inbound_task_specs(spec)[:]"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        return all_parent_names"},{"line_number":579,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_83750d9b","line":576,"in_reply_to":"bfb3d3c7_485e54e7","updated":"2019-05-17 10:27:58.000000000","message":"Yeah, nice catch! We need a copy for the first time, but not here.","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"},{"author":{"_account_id":8731,"name":"Renat Akhmerov","email":"renat.akhmerov@gmail.com","username":"rakhmerov"},"change_message_id":"aaa955763ac4a0f540145549627258236a01fcaf","unresolved":false,"context_lines":[{"line_number":573,"context_line":"        while inbound_specs:"},{"line_number":574,"context_line":"            spec \u003d inbound_specs.pop()"},{"line_number":575,"context_line":"            all_parent_names.add(spec.get_name())"},{"line_number":576,"context_line":"            inbound_specs +\u003d self.wf_spec.find_inbound_task_specs(spec)[:]"},{"line_number":577,"context_line":""},{"line_number":578,"context_line":"        return all_parent_names"},{"line_number":579,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"bfb3d3c7_485e54e7","line":576,"in_reply_to":"bfb3d3c7_8503d50d","updated":"2019-05-17 09:25:26.000000000","message":"Hah, interesting.. Misha, can you please comment? I bet you did it on purpose but I don\u0027t exactly understand why.","commit_id":"8a74e6f611216b677cf5275f7530c932fda48099"},{"author":{"_account_id":21970,"name":"Andras Kovi","email":"akovi@nokia.com","username":"andras.kovi"},"change_message_id":"a36456a342060e7185b14be76bb5453816468eed","unresolved":false,"context_lines":[{"line_number":562,"context_line":"                # and if this is the case, we download full task execution"},{"line_number":563,"context_line":"                # and then evaluate its context to find the route."},{"line_number":564,"context_line":"                # TODO(mfedosin): Think of a way to avoid this."},{"line_number":565,"context_line":"                if self._is_conditional_transition(t_ex, task_spec) and \\"},{"line_number":566,"context_line":"                        not hasattr(t_ex, \"in_context\"):"},{"line_number":567,"context_line":"                    t_ex \u003d db_api.get_task_execution(t_ex.id)"},{"line_number":568,"context_line":"                    t_execs_cache[t_ex.name] \u003d t_ex"}],"source_content_type":"text/x-python","patch_set":10,"id":"bfb3d3c7_834bcd85","line":565,"range":{"start_line":565,"start_character":70,"end_line":565,"end_character":73},"updated":"2019-05-17 11:59:23.000000000","message":"nitpick: are we now allowed to use backslash?","commit_id":"ff00c9c778c2e8c8f1f435654a4f4f097c841b10"}]}
