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/05/31 04:18:16 UTC
[GitHub] [shardingsphere] zhenglu8 opened a new issue, #18085: ERROR 1997 (C1997): Runtime exception: [Job is completed, it's not necessary to do it.]
zhenglu8 opened a new issue, #18085:
URL: https://github.com/apache/shardingsphere/issues/18085
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
we find java version: java17, full_version=17.0.1
ShardingSphere-5.1.2-SNAPSHOT
Commit ID: 7dde4e14195f3542e9c6f3d67c60465c51bc6800
Commit Message: SHOW USED RESOURCE (#18022)
Branch: master
Build time: 2022-05-31T11:04:15+0800
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
no error
### Actual behavior
```
[ERROR] 2022-05-31 11:59:55.716 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.data.pipeline.core.exception.PipelineVerifyFailedException: Job is completed, it's not necessary to do it.
at org.apache.shardingsphere.data.pipeline.core.api.impl.RuleAlteredJobAPIImpl.verifyJobNotCompleted(RuleAlteredJobAPIImpl.java:161)
at org.apache.shardingsphere.data.pipeline.core.api.impl.RuleAlteredJobAPIImpl.stopClusterWriteDB(RuleAlteredJobAPIImpl.java:181)
at org.apache.shardingsphere.scaling.distsql.handler.update.StopScalingSourceWritingUpdater.executeUpdate(StopScalingSourceWritingUpdater.java:34)
at org.apache.shardingsphere.scaling.distsql.handler.update.StopScalingSourceWritingUpdater.executeUpdate(StopScalingSourceWritingUpdater.java:28)
at org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.update.UpdatableScalingRALBackendHandler.execute(UpdatableScalingRALBackendHandler.java:40)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:97)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:106)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
[INFO ] 2022-05-31 12:00:34.650 [ShardingSphere-Command-2] o.a.s.d.p.c.a.i.RuleAlteredJobAPIImpl - Data consistency check for job 0130317c30317c3054317c7363616c696e675f64656d6f, algorithmType: CRC32_MATCH
[ERROR] 2022-05-31 12:00:34.660 [ShardingSphere-Command-2] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
org.apache.shardingsphere.data.pipeline.core.exception.PipelineVerifyFailedException: Source writing is not stopped. You could run `STOP SCALING SOURCE WRITING {jobId}` to stop it.
at org.apache.shardingsphere.data.pipeline.core.api.impl.RuleAlteredJobAPIImpl.verifySourceWritingStopped(RuleAlteredJobAPIImpl.java:169)
at org.apache.shardingsphere.data.pipeline.core.api.impl.RuleAlteredJobAPIImpl.verifyDataConsistencyCheck(RuleAlteredJobAPIImpl.java:289)
at org.apache.shardingsphere.data.pipeline.core.api.impl.RuleAlteredJobAPIImpl.dataConsistencyCheck(RuleAlteredJobAPIImpl.java:275)
at org.apache.shardingsphere.scaling.distsql.handler.query.CheckScalingQueryResultSet.init(CheckScalingQueryResultSet.java:51)
at org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.query.QueryableScalingRALBackendHandler.execute(QueryableScalingRALBackendHandler.java:48)
at org.apache.shardingsphere.proxy.backend.text.distsql.ral.scaling.query.QueryableScalingRALBackendHandler.execute(QueryableScalingRALBackendHandler.java:37)
at org.apache.shardingsphere.proxy.backend.text.DatabaseRequiredBackendHandler.execute(DatabaseRequiredBackendHandler.java:51)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:97)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:106)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```
### Reason analyze (If you can)
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```
ADD RESOURCE ds_0 (
URL="jdbc:mysql://192.168.10.18:33307/original_1?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=password
), ds_1 (
URL="jdbc:mysql://192.168.10.18:33307/original_2?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=password
);
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,PROPERTIES("worker-id"=123)))
), 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,PROPERTIES("worker-id"=123)))
);
CREATE SHARDING BINDING TABLE RULES (t_order,t_order_item);
-- 创建表
CREATE TABLE t_order (order_id INT NOT NULL, user_id INT NOT NULL, status VARCHAR(45) NULL, PRIMARY KEY (order_id));
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));
INSERT INTO t_order (order_id, user_id, status) VALUES (1,2,'legacy'),(2,4,'legacy'),(3,6,'legacy'),(4,1,'legacy'),(5,3,'legacy'),(6,5,'legacy');
INSERT INTO t_order_item (item_id, order_id, user_id, status) VALUES (1,1,2,'legacy'),(2,2,4,'legacy'),(3,3,6,'legacy'),(4,4,1,'legacy'),(5,5,3,'legacy'),(6,6,5,'legacy');
ADD RESOURCE ds_3 (
URL="jdbc:mysql://192.168.10.18:33307/new_1?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=password
), ds_4 (
URL="jdbc:mysql://192.168.10.18:33307/new_2?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=password
), ds_5 (
URL="jdbc:mysql://192.168.10.18:33307/new_3?serverTimezone=UTC&useSSL=false",
USER=root,
PASSWORD=password
);
CREATE SHARDING SCALING RULE scaling1;
ALTER SHARDING TABLE RULE t_order(
RESOURCES(ds_3,ds_4,ds_5),
SHARDING_COLUMN=order_id,
TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
), t_order_item(
RESOURCES(ds_3,ds_4,ds_5),
SHARDING_COLUMN=order_id,
TYPE(NAME=hash_mod,PROPERTIES("sharding-count"=6)),
KEY_GENERATE_STRATEGY(COLUMN=order_id,TYPE(NAME=snowflake,PROPERTIES("worker-id"=123)))
);
SHOW SCALING LIST \G
SHOW SCALING STATUS ${JOB_ID};
INSERT INTO t_order (order_id, user_id, status)
VALUES (10, 2, 'migrating_increment'),
(20, 4, 'migrating_increment'),
(30, 6, 'migrating_increment'),
(40, 1, 'migrating_increment'),
(50, 3, 'migrating_increment'),
(60, 5, 'migrating_increment');
INSERT INTO t_order_item (item_id, order_id, user_id, status)
VALUES (10, 1, 2, 'migrating_increment'),
(20, 2, 4, 'migrating_increment'),
(30, 3, 6, 'migrating_increment'),
(40, 4, 1, 'migrating_increment'),
(50, 5, 3, 'migrating_increment'),
(60, 6, 5, 'migrating_increment');
STOP SCALING SOURCE WRITING ${JOB_ID};
```
### Example codes for reproduce this issue (such as a github link).
--
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] sandynz commented on issue #18085: ERROR 1997 (C1997): Runtime exception: [Job is completed, it's not necessary to do it.]
Posted by GitBox <gi...@apache.org>.
sandynz commented on issue #18085:
URL: https://github.com/apache/shardingsphere/issues/18085#issuecomment-1144446258
After discussion with @zhenglu8 , `Job is completed, it's not necessary to do it.` is because of job is failed.
Looks the root cause is `PREPARING_FAILURE` since of database configuration is not changed.
Close for now. Feel free to submit new issue if there's new problem occur.
--
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] zhenglu8 commented on issue #18085: ERROR 1997 (C1997): Runtime exception: [Job is completed, it's not necessary to do it.]
Posted by GitBox <gi...@apache.org>.
zhenglu8 commented on issue #18085:
URL: https://github.com/apache/shardingsphere/issues/18085#issuecomment-1141656626
```
mysql> SHOW SCALING LIST;
+------------------------------------------------+----------------------+----------------------+--------+---------------------+-----------+
| id | tables | sharding_total_count | active | create_time | stop_time |
+------------------------------------------------+----------------------+----------------------+--------+---------------------+-----------+
| 0130317c30317c3054317c7363616c696e675f64656d6f | t_order,t_order_item | 2 | true | 2022-05-31 11:58:55 | NULL |
+------------------------------------------------+----------------------+----------------------+--------+---------------------+-----------+
1 row in set (0.02 sec)
mysql> SHOW SCALING STATUS 0130317c30317c3054317c7363616c696e675f64656d6f;
+------+-------------+-------------------+--------+-------------------------------+--------------------------+
| item | data_source | status | active | inventory_finished_percentage | incremental_idle_seconds |
+------+-------------+-------------------+--------+-------------------------------+--------------------------+
| 0 | | PREPARING_FAILURE | true | 0 | 0 |
| 1 | | PREPARING_FAILURE | true | 0 | 0 |
+------+-------------+-------------------+--------+-------------------------------+--------------------------+
2 rows in set (0.02 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
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] sandynz closed issue #18085: ERROR 1997 (C1997): Runtime exception: [Job is completed, it's not necessary to do it.]
Posted by GitBox <gi...@apache.org>.
sandynz closed issue #18085: ERROR 1997 (C1997): Runtime exception: [Job is completed, it's not necessary to do it.]
URL: https://github.com/apache/shardingsphere/issues/18085
--
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