aubertaa opened a new issue, #4809:
URL: https://github.com/apache/incubator-devlake/issues/4809

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   After devlake start (docker compose up), it seems that database stays locked.
   
   For example, i'm trying to dump sql database to backup my instance 
(automated in a cloudformation AWS stack) and it's freezing on this when 
triggering this command:
   
   - command:
   
   `mysqldump -uroot -p$DB_ROOT_PASSWORD --databases lake  --skip-comments > 
/tmp/sqlbackup.sql`
   
   - `show processlist;` shows:
   
   `Waiting for table metadata lock | LOCK TABLES `_devlake_blueprint_labels` 
READ /*!32311 LOCAL */,`_devlake_blueprints` READ /*!32311 L`
   
   - here is the full processlist, if this could help:
   
   mysql> show processlist;
   ```
   
+----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   | Id | User            | Host             | db   | Command | Time | State    
                       | Info                                                   
                                              |
   
+----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   |  5 | event_scheduler | localhost        | NULL | Daemon  |  323 | Waiting 
on empty queue          | NULL                                                  
                                               |
   |  8 | devlake-user    | 172.17.0.4:37408 | lake | Sleep   |    1 |          
                       | NULL                                                   
                                              |
   |  9 | devlake-user    | 172.17.0.4:37424 | lake | Sleep   |  319 |          
                       | NULL                                                   
                                              |
   | 10 | devlake-user    | 172.17.0.4:37428 | lake | Sleep   |  319 |          
                       | NULL                                                   
                                              |
   | 11 | root            | localhost        | NULL | Query   |    0 | init     
                       | show processlist                                       
                                              |
   | 12 | root            | localhost        | lake | Query   |   39 | Waiting 
for table metadata lock | LOCK TABLES `_devlake_blueprint_labels` READ /*!32311 
LOCAL */,`_devlake_blueprints` READ /*!32311 L |
   
+----+-----------------+------------------+------+---------+------+---------------------------------+------------------------------------------------------------------------------------------------------+
   6 rows in set (0.00 sec)
   ```
   
   I tried also with `--single-transaction=TRUE` option but it's not better, 
it's then waiting for FLUSH:
   
    mysql> show processlist;
   ```
   
+----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   | Id | User            | Host             | db   | Command | Time | State    
               | Info             |
   
+----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   |  5 | event_scheduler | localhost        | NULL | Daemon  | 1957 | Waiting 
on empty queue  | NULL             |
   |  8 | devlake-user    | 172.17.0.4:37408 | lake | Sleep   |    0 |          
               | NULL             |
   |  9 | devlake-user    | 172.17.0.4:37424 | lake | Sleep   | 1953 |          
               | NULL             |
   | 10 | devlake-user    | 172.17.0.4:37428 | lake | Sleep   | 1953 |          
               | NULL             |
   | 13 | root            | localhost        | NULL | Query   |  195 | Waiting 
for table flush | FLUSH TABLES     |
   | 15 | root            | localhost        | NULL | Query   |    0 | init     
               | show processlist |
   
+----+-----------------+------------------+------+---------+------+-------------------------+------------------+
   6 rows in set (0.00 sec)
   ```
   
   Killing process id 9 with `KILL 9;` is always enough to unlock the situation 
(process is respawn at each devlake restart).
   I don't know what this process is but it seems to lock a bit hardly the 
database.
   
   
   ### What do you expect to happen
   
   mysqldump command should be successful to make a backup of the database 
whenever i want.
   (same problem occurs of course when i'm trying to restore a dump with mysql 
command)
   
   ### How to reproduce
   
   start fresh devlake instance with docker-compose.
   try to dump the database with: 
   `mysqldump -uroot -p$DB_ROOT_PASSWORD --databases lake  --skip-comments > 
/tmp/sqlbackup.sql`
   
   ### Anything else
   
   version is 0.16-beta10 (but is not available in the list i can choose from)
   
   ### Version
   
   v0.15.0
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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-unsubscr...@devlake.apache.org.apache.org

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

Reply via email to