weldpua2008 opened a new issue #14658:
URL: https://github.com/apache/airflow/issues/14658


   **Apache Airflow version**: 1.10.14
   
   **Environment**:
   Mysql 5.7.14
   - **Cloud provider or hardware configuration**: on premise
   - **OS** (e.g. from /etc/os-release):  Debian 9 (stretch)
   - **Kernel** (e.g. `uname -a`):  4.9.0-12-amd64 #1 SMP Debian 4.9.210-1 
(2020-01-20) x86_64 GNU/Linux
   - **Install tools**:
   * apache-airflow                               1.10.14
   * apache-airflow-backport-providers-salesforce 2020.6.24
   
   **What happened**:
   We have 2 setups of Airflow from 1.10.3 (-->1.10.9 -->1.10.11 --> 1.10.14). 
On one of the setups we had no index:
   ```sql 
   mysql> show create table job;
   
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | Table | Create Table                                                       
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                          |
   
+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | job   | CREATE TABLE `job` (
     `id` int(11) NOT NULL AUTO_INCREMENT,
     `dag_id` varchar(250) DEFAULT NULL,
     `state` varchar(20) DEFAULT NULL,
     `job_type` varchar(30) DEFAULT NULL,
     `start_date` timestamp(6) NULL DEFAULT NULL,
     `end_date` timestamp(6) NULL DEFAULT NULL,
     `latest_heartbeat` timestamp(6) NULL DEFAULT NULL,
     `executor_class` varchar(500) DEFAULT NULL,
     `hostname` varchar(500) DEFAULT NULL,
     `unixname` varchar(1000) DEFAULT NULL,
     PRIMARY KEY (`id`),
     KEY `idx_job_state_heartbeat` (`state`,`latest_heartbeat`)
   ) ENGINE=InnoDB AUTO_INCREMENT=3003584 DEFAULT CHARSET=utf8 |
   ``` 
   I tried to run `airflow upgradedb`
   DB: mysql://u_c12212dc5_rw:***@mysql.42.prod.net/airflow_prod
   [2021-03-08 08:47:33,181] {db.py:378} INFO - Creating tables
   INFO  [alembic.runtime.migration] Context impl MySQLImpl.
   INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
   but index still was absent.
   
   How I can force check and re-create all indexes?
   
   **What you expected to happen**:
   airflow upgradedb is fixes the schema
   
   **How to reproduce it**:
   I don't know. 
   **Anything else we need to know**:
   We started with airflow 1.10.3 and migrated:-->1.10.9 -->1.10.11 --> 1.10.14
   Each time we used upgrade 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.

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


Reply via email to