You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/08 09:05:26 UTC

[GitHub] [airflow] weldpua2008 opened a new issue #14658: MySQL is missing index

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:
users@infra.apache.org



[GitHub] [airflow] potiuk closed issue #14658: MySQL is missing index

Posted by GitBox <gi...@apache.org>.
potiuk closed issue #14658:
URL: https://github.com/apache/airflow/issues/14658


   


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on issue #14658: MySQL is missing index

Posted by GitBox <gi...@apache.org>.
potiuk commented on issue #14658:
URL: https://github.com/apache/airflow/issues/14658#issuecomment-924713124


   You have not written which index you miss, I guess it was possibly a bad migration or maybe a bug in some of the old migration process. Nothing that can be fixed now as 1.10 is already end of life and will not receive any fixes. My recommendation is to create the missing index manually.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] boring-cyborg[bot] commented on issue #14658: MySQL is missing index

Posted by GitBox <gi...@apache.org>.
boring-cyborg[bot] commented on issue #14658:
URL: https://github.com/apache/airflow/issues/14658#issuecomment-792599028


   Thanks for opening your first issue here! Be sure to follow the issue template!
   


----------------------------------------------------------------
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:
users@infra.apache.org