You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/06/15 00:39:01 UTC

[GitHub] [shardingsphere] sandynz commented on issue #9568: [New Feature] Support to show execution process for running SQLs by RQL

sandynz commented on issue #9568:
URL: https://github.com/apache/shardingsphere/issues/9568#issuecomment-861083398


   Hi, I've tested it without breakpoint.
   
   Steps:
   
   1, Set `show-process-list-enabled: true` in `server.yaml` props; enable governance;
   
   2, `actualDataNodes: ds_${0..1}.t_order_${0..1}` in `config-sharding.yaml`
   
   3, Start ZooKeeper and clean cache; Start proxy and insert 36 millions records (every shard 9 million)
   
   4, Execute DDL in MySQL client
   ```
   mysql> alter table t_order add column a varchar(64) after order_id;
   Query OK, 0 rows affected (16.10 sec)
   ```
   
   5, In another MySQL client, execute `show processlist;` repeatedly
   ```
   mysql> show processlist;
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | Id                                   | User | Host            | db          | Command | Time | State         | Info |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | bc5c2ee7-f662-4cdf-875e-6ab7df6477ad | root | 0:0:0:0:0:0:0:1 | sharding_db | Execute | 3    | Executing 0/4 |      |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   1 row in set (0.01 sec)
   
   mysql> show processlist;
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | Id                                   | User | Host            | db          | Command | Time | State         | Info |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | bc5c2ee7-f662-4cdf-875e-6ab7df6477ad | root | 0:0:0:0:0:0:0:1 | sharding_db | Execute | 8    | Executing 2/4 |      |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   1 row in set (0.01 sec)
   
   mysql> show processlist;
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | Id                                   | User | Host            | db          | Command | Time | State         | Info |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   | bc5c2ee7-f662-4cdf-875e-6ab7df6477ad | root | 0:0:0:0:0:0:0:1 | sharding_db | Execute | 15   | Executing 3/4 |      |
   +--------------------------------------+------+-----------------+-------------+---------+------+---------------+------+
   1 row in set (0.01 sec)
   
   mysql> show processlist;
   Empty set (0.00 sec)
   ```
   


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