itayB commented on issue #24526:
URL: https://github.com/apache/airflow/issues/24526#issuecomment-1171496134

   I don't want to mix things here, not sure if that's a similar case - but we 
managed to overcome the issue by taking the scheduler down and running the 
following:
   ```
   USE airflow;
   ALTER TABLE task_reschedule
   ADD CONSTRAINT `task_reschedule_ti_fkey` FOREIGN KEY (`dag_id`, `task_id`, 
`run_id`) REFERENCES `task_instance` (`dag_id`, `task_id`, `run_id`) ON DELETE 
CASCADE;
   ALTER TABLE task_reschedule
   ADD KEY `idx_task_reschedule_dag_task_run` (`dag_id`,`task_id`,`run_id`);
   ALTER TABLE `task_instance` 
   ADD PRIMARY KEY (`dag_id`,`task_id`,`run_id`);
   ALTER TABLE task_instance DROP COLUMN map_index;
   ```
   
   Then we start the scheduler and it pass this migration step and all the 
following.
   It was relatively slow compared to our staging environment.
   When we upgrade our staging environment everything was smooth but it has 
much smaller amount of data in the DB. 


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