pingzh commented on a change in pull request #21877:
URL: https://github.com/apache/airflow/pull/21877#discussion_r832460506



##########
File path: airflow/jobs/local_task_job.py
##########
@@ -104,11 +104,6 @@ def signal_handler(signum, frame):
         try:
             self.task_runner.start()
 
-            # Unmap the task _after_ it has forked/execed. (This is a bit of a 
kludge, but if we unmap before

Review comment:
       @potiuk actually they were removed since the `task` in the 
`task_instance` is not longer needed as the LocalTaskJob not longer runs the 
callbacks and the `task` is deserialized from the database, calling `unmap` is 
unnecessary and also causes issues when the task involves `MappedOperator`, 
https://github.com/apache/airflow/blob/main/airflow/models/mappedoperator.py#L455-L456
 
   
   ```
           if isinstance(self.operator_class, str):
               raise RuntimeError("Cannot unmap a deserialized operator")
   ```
   
   (the `operator_class` is str for deserialized object)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to