sandynz commented on PR #21949:
URL: https://github.com/apache/shardingsphere/pull/21949#issuecomment-1302999189

   Steps is the same as [usage doc]( 
https://shardingsphere.apache.org/document/5.2.1/en/user-manual/shardingsphere-proxy/migration/usage/#complete-procedure-example
 ).
   
   After job status reach `EXECUTE_INCREMENTAL_TASK`, update sharding column in 
source table:
   ```
   mysql> update t_order set order_id=7,status='updated1' where order_id=6;
   Query OK, 1 row affected (0.05 sec)
   Rows matched: 1  Changed: 1  Warnings: 0
   ```
   
   Proxy log:
   ```
   
[ShardingSphere-pipeline-Incremental-j01016e501b498ed1bdb2c373a2e85e2529a6-2] 
o.a.s.d.p.c.importer.DefaultImporter - flush failed 3/3 times.
   java.sql.SQLException: Can not update sharding value for table `t_order`.
        at 
org.apache.shardingsphere.infra.util.exception.external.sql.ShardingSphereSQLException.toSQLException(ShardingSphereSQLException.java:59)
        at 
org.apache.shardingsphere.dialect.SQLExceptionTransformEngine.toSQLException(SQLExceptionTransformEngine.java:51)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.executeUpdate(ShardingSpherePreparedStatement.java:346)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.executeUpdate(DefaultImporter.java:236)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.executeUpdate(DefaultImporter.java:215)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.doFlush(DefaultImporter.java:176)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.tryFlush(DefaultImporter.java:152)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.flushInternal(DefaultImporter.java:145)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.flush(DefaultImporter.java:136)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.write(DefaultImporter.java:108)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.runBlocking(DefaultImporter.java:94)
        at 
org.apache.shardingsphere.data.pipeline.api.executor.AbstractLifecycleExecutor.start(AbstractLifecycleExecutor.java:53)
        at 
org.apache.shardingsphere.data.pipeline.api.executor.AbstractLifecycleExecutor.run(AbstractLifecycleExecutor.java:91)
   ```
   
   Job failed:
   ```
   mysql> SHOW MIGRATION LIST;
   
+---------------------------------------+---------+----------------+--------+---------------------+---------------------+
   | id                                    | tables  | job_item_count | active 
| create_time         | stop_time           |
   
+---------------------------------------+---------+----------------+--------+---------------------+---------------------+
   | j01016e501b498ed1bdb2c373a2e85e2529a6 | t_order | 1              | false  
| 2022-11-04 13:25:59 | 2022-11-04 13:29:06 |
   
+---------------------------------------+---------+----------------+--------+---------------------+---------------------+
   1 row in set (0.03 sec)
   
   mysql> SHOW MIGRATION STATUS 'j01016e501b498ed1bdb2c373a2e85e2529a6';
   
+------+-------------+----------------------------------+--------+-------------------------+-------------------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | item | data_source | status                           | active | 
processed_records_count | inventory_finished_percentage | 
incremental_idle_seconds | error_message                                        
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                      
                                                                                
                                                                                
                       |
   
+------+-------------+----------------------------------+--------+-------------------------+-------------------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   | 0    | ds_0        | EXECUTE_INCREMENTAL_TASK_FAILURE | false  | 6         
              | 100                           | 43                       | 
java.util.concurrent.CompletionException: 
org.apache.shardingsphere.data.pipeline.core.exception.job.PipelineImporterJobWriteException:
 Importer job write data failed.
        at 
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
        at 
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280)
        at 
java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1643)
        at 
java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
   Caused by: 
org.apache.shardingsphere.data.pipeline.core.exception.job.PipelineImporterJobWriteException:
 Importer job write data failed.
        at 
org.apache.shardingsphere.infra.util.exception.ShardingSpherePreconditions.checkState(ShardingSpherePreconditions.java:41)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.flushInternal(DefaultImporter.java:146)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.flush(DefaultImporter.java:136)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.write(DefaultImporter.java:108)
        at 
org.apache.shardingsphere.data.pipeline.core.importer.DefaultImporter.runBlocking(DefaultImporter.java:94)
        at 
org.apache.shardingsphere.data.pipeline.api.executor.AbstractLifecycleExecutor.start(AbstractLifecycleExecutor.java:53)
        at 
org.apache.shardingsphere.data.pipeline.api.executor.AbstractLifecycleExecutor.run(AbstractLifecycleExecutor.java:91)
        at 
java.util.concurrent.CompletableFuture$AsyncRun.run$$$capture(CompletableFuture.java:1640)
        ... 4 more
    |
   
+------+-------------+----------------------------------+--------+-------------------------+-------------------------------+--------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
   1 row 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to