soulasuna opened a new issue #11359:
URL: https://github.com/apache/shardingsphere/issues/11359


   ## Bug Report
   Shardingsphere-shadow data source routing problem.
   Take the insart statement as an example.
   
   1.  When the sql without the configured shadow rule is executed, the 
configured shadow data source will be used, and the data will be written to the 
shadow database.
   
   
![1626404885662](https://user-images.githubusercontent.com/33794770/125886484-8bb4b53e-8f7e-49bb-bfc8-68680fbc7e16.jpg)
   
   2.  When the SQL configured with the shadow rule is executed, an error will 
be reported.
   
   
![01](https://user-images.githubusercontent.com/33794770/125886563-4fe0caad-858d-45d9-812e-26efa9f57e5c.jpg)
   
   
   ### Which version of ShardingSphere did you use?
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Reason analyze (If you can)
   The route method in the class PartialSQLRouteExecutor.
   The createRouteContext in ShadowSQLRouter will not be called during 
execution.
   The decorateRouteContext decoration method will be executed.
   But after entering the method, the RouteMapper in the RouteContext is the 
configured shadow data source.
   
   
![1626406038887](https://user-images.githubusercontent.com/33794770/125887358-b28a0cec-2991-477d-b16f-82ac9e763b38.jpg)
   
   Configuration file:
   
![1626406589026](https://user-images.githubusercontent.com/33794770/125887963-c25f0c13-8e6e-4871-8862-c2628f4f5782.jpg)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   The exception can be reproduced by executing any project of 
shardingsphere-jdbc-example/shadow-example in the examples in the official 
project.
   
   ### Example codes for reproduce this issue (such as a github link).
   
[Example](https://github.com/apache/shardingsphere/tree/master/examples/shardingsphere-jdbc-example/other-feature-example/shadow-example/shadow-spring-boot-example)


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