o-nikolas commented on code in PR #77550:
URL: https://github.com/apache/airflow/pull/77550#discussion_r4682853450


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -3912,27 +3918,24 @@ def adopt_or_reset_orphaned_tasks(self, *, session: 
Session = NEW_SESSION) -> in
                         self.log.info("Marked %d SchedulerJob instances as 
failed", num_failed)
                         stats.incr(self.__class__.__name__.lower() + "_end", 
num_failed)
 
+                    # Every column but executor_config, and the Dag runs from 
the join: executors' adoption

Review Comment:
   Small one: this says every column but `executor_config` is loaded, but 
`next_method` and `next_kwargs` are deferred too a few lines below. Could you 
update it so it matches?
   
   ---
   Drafted-by: Kiro (claude-opus-5.5); reviewed by @o-nikolas before posting



##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -1815,6 +1859,7 @@ def get_last_try_numbers(
 
     def prepare_db_for_next_try(self, session: Session) -> TaskInstance:
         """Archive this UUID and return its successor in the caller's 
transaction."""
+        # _reset_orphaned_attempts writes the same rows in bulk; change both.

Review Comment:
   +1 to a single writer. Since `prepare_db_for_next_try` is on every retry 
path, I'd keep this PR to the orphan path and do the merge in a follow-up, with 
an issue linked from that comment.
   
   ---
   Drafted-by: Kiro (claude-opus-5.5); reviewed by @o-nikolas before posting



-- 
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