https://github.com/apache/airflow/pull/12139 added some new params to the scheduler -- we have "cursory" docs for them in the comments in the config file, but we should have a more details docs in the scheduler.rst page.
airflow/jobs/scheduler_job.py
.join(TI.dag_run)
            .filter(
                DagRun.run_type != DagRunType.BACKFILL_JOB,
                
                DagRun.state == State.RUNNING,
            )
            .options(load_only(TI.dag_id, TI.task_id, TI.execution_date))
        )
        
        tis_to_reset_or_adopt = with_row_locks(query, of=TI, **skip_locked(session=session)).all()
        to_reset = self.executor.try_adopt_task_instances(tis_to_reset_or_adopt)
        reset_tis_message = []
        for ti in to_reset:
            reset_tis_message.append(repr(ti))
            ti.state = State.NONE
            ti.queued_by_job_id = None
        for ti in set(tis_to_reset_or_adopt) - set(to_reset):
            ti.queued_by_job_id = self.id
        Stats.incr('scheduler.orphaned_tasks.cleared', len(to_reset))
        Stats.incr('scheduler.orphaned_tasks.adopted', len(tis_to_reset_or_adopt) - len(to_reset))
        if to_reset:
            task_instance_str = '\n\t'.join(reset_tis_message)
            self.log.info(
                "Reset the following %s orphaned TaskInstances:\n\t%s", len(to_reset), task_instance_str
            )
        
        
        session.flush()
        return len(to_reset)