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/06/07 15:05:54 UTC

[GitHub] [airflow] anitakar opened a new issue #16310: Enable running airflow db init in parallel

anitakar opened a new issue #16310:
URL: https://github.com/apache/airflow/issues/16310


   **Apache Airflow version**:
   2.0.1
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   Not applicable
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: None
   - **OS** (e.g. from /etc/os-release): Ubuntu
   - **Kernel** (e.g. `uname -a`): 
   - **Install tools**:
   - **Others**:
   
   **What happened**:
   
   1. Ran airflow db init on mysql in parallel in 2 command lines. Only one command did the migrations, the other one waited. But connections were inserted twice. I would like them not to be added twice.
   2. Ran airflow db init on postgres in parallel in 2 command lines. Both command lines started doing migrations on the same db in parallel. I would like one command to run, the other to wait.
   
   **What you expected to happen**:
   
   1. For MySQL. Connections and other config objects to be inserted only once.
   2. For Postgres. Only one migration can be performed in the same time for the same db.
   
   **How to reproduce it**:
   Scenario 1:
   Setup Airflow so that it uses MySQL.
   Run `airflow init db` in 2 command lines, side by side.
   
   Scenario 2:
   Setup Airflow so that it uses Postgres.
   Run `airflow init db` in 2 command lines, side by side.
   
   **Anything else we need to know**:
   This problem occurs every time.


-- 
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] uranusjr commented on issue #16310: Enable running airflow db init in parallel

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


   I’m curious though, why would you want to run two `init`s side by side? There’s only one database, is it not?


-- 
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 #16310: Enable running airflow db init in parallel

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


   


-- 
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] anitakar commented on issue #16310: Enable running airflow db init in parallel

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


   About to submit PR for that bug.


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