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 2022/04/25 11:24:18 UTC

[GitHub] [shardingsphere] zjcnb opened a new issue, #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

zjcnb opened a new issue, #17092:
URL: https://github.com/apache/shardingsphere/issues/17092

   ### Which version of ShardingSphere did you use?
   
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   `ShardingSphere-Proxy`
   
   ### Expected behavior
   
   ```
   +------+-------------+----------+--------+-------------------------------+--------------------------+
   | item | data_source | status   | active | inventory_finished_percentage | incremental_idle_seconds |
   +------+-------------+----------+--------+-------------------------------+--------------------------+
   | 0    | ds_0        | FINISHED | false  | 100                           | 81                       |
   | 1    | ds_1        | FINISHED | false  | 100                           | 81                       |
   +------+-------------+----------+--------+-------------------------------+--------------------------+
   ```
   
   ### Actual behavior
   
   ```
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   | item | data_source | status                           | active | inventory_finished_percentage | incremental_idle_seconds |
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   | 0    | ds_0        | EXECUTE_INCREMENTAL_TASK_FAILURE | true   | 100                           | 9                        |
   | 1    | ds_1        | EXECUTE_INCREMENTAL_TASK_FAILURE | true   | 100                           | 5                        |
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   ```
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   ```
   mysql> create database test1;
   Query OK, 0 rows affected (0.85 sec)
   
   mysql> use test1;
   Database changed
   mysql> ADD RESOURCE ds_0 (
       ->     URL="jdbc:mysql://127.0.0.1:3306/scaling_ds_0?serverTimezone=UTC&useSSL=false",
       ->     USER=root,
       ->     PASSWORD=123456,
       ->     PROPERTIES("maximumPoolSize"=50,"idleTimeout"="60000")
       -> ), ds_1 (
       ->     URL="jdbc:mysql://127.0.0.1:3306/scaling_ds_1?serverTimezone=UTC&useSSL=false",
       ->     USER=root,
       ->     PASSWORD=123456,
       ->     PROPERTIES("maximumPoolSize"=50,"idleTimeout"="60000")
       -> );
   Query OK, 0 rows affected (0.93 sec)
   
   mysql> CREATE SHARDING TABLE RULE t_order(
       -> RESOURCES(ds_0,ds_1),
       -> SHARDING_COLUMN=order_id,
       -> TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
       -> KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
       -> ), t_order_item(
       -> RESOURCES(ds_0,ds_1),
       -> SHARDING_COLUMN=order_id,
       -> TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=4)),
       -> KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
       -> );
   Query OK, 0 rows affected (2.03 sec)
   
   mysql> CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
   Query OK, 0 rows affected (0.30 sec)
   
   mysql>
   mysql> CREATE TABLE t_order_item (item_id INT NOT NULL, order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, creation_date DATE, PRIMARY KEY (item_id));
   Query OK, 0 rows affected (0.04 sec)
   
   mysql> insert into t_order (order_id, user_id, status) values (1,2,'ok'),(2,4,'ok'),(3,6,'ok'),(4,1,'ok'),(5,3,'ok'),(6,5,'ok');
   Query OK, 6 rows affected (0.07 sec)
   
   mysql>
   mysql> insert into t_order_item (item_id, order_id, user_id, status) values (1,1,2,'ok'),(2,2,4,'ok'),(3,3,6,'ok'),(4,4,1,'ok'),(5,5,3,'ok'),(6,6,5,'ok');
   Query OK, 6 rows affected (0.00 sec)
   
   mysql> preview select count(1) from t_order;
   +------------------+-------------------------------------------------------------------------+
   | data_source_name | actual_sql                                                              |
   +------------------+-------------------------------------------------------------------------+
   | ds_0             | select count(1) from t_order_0 UNION ALL select count(1) from t_order_2 |
   | ds_1             | select count(1) from t_order_1 UNION ALL select count(1) from t_order_3 |
   +------------------+-------------------------------------------------------------------------+
   2 rows in set (0.10 sec)
   
   mysql>
   mysql> preview select count(1) from t_order_item;
   +------------------+-----------------------------------------------------------------------------------+
   | data_source_name | actual_sql                                                                        |
   +------------------+-----------------------------------------------------------------------------------+
   | ds_0             | select count(1) from t_order_item_0 UNION ALL select count(1) from t_order_item_2 |
   | ds_1             | select count(1) from t_order_item_1 UNION ALL select count(1) from t_order_item_3 |
   +------------------+-----------------------------------------------------------------------------------+
   2 rows in set (0.01 sec)
   
   mysql> ADD RESOURCE ds_2 (
       ->     URL="jdbc:mysql://127.0.0.1:3306/scaling_ds_10?serverTimezone=UTC&useSSL=false",
       ->     USER=root,
       ->     PASSWORD=123456,
       ->     PROPERTIES("maximumPoolSize"=50,"idleTimeout"="60000")
       -> ), ds_3 (
       ->     URL="jdbc:mysql://127.0.0.1:3306/scaling_ds_11?serverTimezone=UTC&useSSL=false",
       ->     USER=root,
       ->     PASSWORD=123456,
       ->     PROPERTIES("maximumPoolSize"=50,"idleTimeout"="60000")
       -> ), ds_4 (
       ->     URL="jdbc:mysql://127.0.0.1:3306/scaling_ds_12?serverTimezone=UTC&useSSL=false",
       ->     USER=root,
       ->     PASSWORD=123456,
       ->     PROPERTIES("maximumPoolSize"=50,"idleTimeout"="60000")
       -> );
   Query OK, 0 rows affected (0.10 sec)
   
   mysql>
   mysql> CREATE SHARDING SCALING RULE scaling_auto2 (
       -> COMPLETION_DETECTOR(TYPE(NAME=IDLE, PROPERTIES("incremental-task-idle-minute-threshold"=1))),
       -> DATA_CONSISTENCY_CHECKER(TYPE(NAME=CRC32_MATCH))
       -> );
   Query OK, 0 rows affected (0.07 sec)
   
   mysql>
   mysql> ALTER SHARDING TABLE RULE t_order(
       -> RESOURCES(ds_2,ds_3,ds_4),
       -> SHARDING_COLUMN=order_id,
       -> TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
       -> KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
       -> ), t_order_item(
       -> RESOURCES(ds_2,ds_3,ds_4),
       -> SHARDING_COLUMN=order_id,
       -> TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
       -> KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake))
       -> );
   Query OK, 0 rows affected (0.14 sec)
   
   mysql> show scaling list;
   +----------------------------------+----------------------+----------------------+--------+---------------------+-----------+
   | id                               | tables               | sharding_total_count | active | create_time         | stop_time |
   +----------------------------------+----------------------+----------------------+--------+---------------------+-----------+
   | 0130317c30317c3054317c7465737431 | t_order,t_order_item | 2                    | true   | 2022-04-25 19:19:25 | NULL      |
   +----------------------------------+----------------------+----------------------+--------+---------------------+-----------+
   1 row in set (0.07 sec)
   
   mysql> show scaling status 0130317c30317c3054317c7465737431
       -> ;
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   | item | data_source | status                           | active | inventory_finished_percentage | incremental_idle_seconds |
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   | 0    | ds_0        | EXECUTE_INCREMENTAL_TASK_FAILURE | true   | 100                           | 9                        |
   | 1    | ds_1        | EXECUTE_INCREMENTAL_TASK_FAILURE | true   | 100                           | 5                        |
   +------+-------------+----------------------------------+--------+-------------------------------+--------------------------+
   2 rows in set (0.01 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1223587893

   I reproduce the problem.  bacause the account password plugin is not equals with  `default_authentication_plugin`
   please check the result of `show variables like 'default_authentication_plugin';` or change account password plugin.
   > ps. the account at this issue is root


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1120179199

   > https://github.com/apache/shardingsphere/actions/runs/2284252654 The scaling IT test will execute once a day, it does not appear to have this problem, did you do any special operations?
   
   No, i not have special operations. I use `brew install mysql` in my macbook.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] sandynz commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1108569480

   Seems MySQL 8.0 was tested before.
   
   Hi @azexcy , could you help to test it on MySQL 8.0.25 when you have 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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1223765459

   > I reproduce the problem. bacause the account password plugin is not equals with `default_authentication_plugin` please check the result of `show variables like 'default_authentication_plugin';` or change account password plugin.
   > 
   > > ps. the account at this issue is root
   
   Thank you for your reply, i will try.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1112832885

   @zjcnb I can't reproduce the problem, can you provider the config of mysql, like `my.cnf` file


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1112835871

   > @zjcnb I can't reproduce the problem, can you provider the config of mysql, like `my.cnf` file
   
   ```
   zhaojinchao@zhaojinchaoçš„MacBook etc % cat my.cnf
   # Default Homebrew MySQL server config
   [mysqld]
   # Only allow connections from localhost
   bind-address = 127.0.0.1
   mysqlx-bind-address = 127.0.0.1
   server-id=1
   log-bin=mysql-bin
   binlog-format=row
   binlog-row-image=full
   max_connections=1200
   ```


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1120154126

   https://github.com/apache/shardingsphere/actions/runs/2284252654
   The scaling IT test will execute once  a day, it does not appear to have this problem, did you do any special operations?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1120147646

   I tested it(both test at docker and native), use the same configuration, but the problem can't reproduce


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1111946365

   OK, I will track this issue


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] azexcy commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
azexcy commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1111946681

   OK, I will track this issue


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
zjcnb commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1143410837

   > Hi @azexcy @zjcnb Could we finish this in 5.1.2?
   
   I move it to `5.1.3` milestone


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] zjcnb closed issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
zjcnb closed issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE
URL: https://github.com/apache/shardingsphere/issues/17092


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] strongduanmu commented on issue #17092: Use scaling feature with mysql 8.x are EXECUTE_INCREMENTAL_TASK_FAILURE

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #17092:
URL: https://github.com/apache/shardingsphere/issues/17092#issuecomment-1223583369

   Hi @zjcnb @sandynz, can we finish this issue in 5.1.3?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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