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 2020/08/15 00:42:13 UTC

[GitHub] [shardingsphere] spyvip opened a new issue #6852: shadow=false ,but it route to shadow datasource

spyvip opened a new issue #6852:
URL: https://github.com/apache/shardingsphere/issues/6852


   ## 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?
   4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   shardingsphere-proxy 
   
   ### Expected behavior
   
   ### Actual behavior
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   ![image](https://user-images.githubusercontent.com/1212932/90301533-1a5d2880-ded3-11ea-91a3-9842cf7d817b.png)
   
   ### 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.

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



[GitHub] [shardingsphere] spyvip commented on issue #6852: shadow=false ,but it route to shadow datasource

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


   > @spyvip Your Logic SQL include `shadow` field, so Actual SQL has.
   > I guess, Your sharding-tables has different field list.(maybe ds0 include `shadow` field. but ds1 not).
   > Check it.
   
   right? 
   I try 5.0.0.rc shardingsphere-proxy,it can remove `shadow` field, but it route wrong database when I use sharding and shadow both, config as flow
   
   # config-my.yaml
   
   ````
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/order0?serverTimezone=UTC&useSSL=false
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/order1?serverTimezone=UTC&useSSL=false
     shadow_ds_0:
       url: jdbc:mysql://127.0.0.1:3306/shadow_order0?serverTimezone=UTC&useSSL=false
     shadow_ds_1:
       url: jdbc:mysql://127.0.0.1:3306/shadow_order1?serverTimezone=UTC&useSSL=false
   rules:
   - !SHARDING
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline  
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm.expression: ds_${user_id % 2}
   
   - !SHADOW
     column: shadow
     shadowMappings:
       ds_0: shadow_ds_0
       ds_1: shadow_ds_1
   ````
   
   # my test sql
   ````
   String sql = "insert into t_order(user_id,order_no,order_name,remark) values('1','123','book-master1','spy')";
           jdbcTemplate.update(sql);
   ````
   
   #  stdout.log
   
   ````
   [INFO ] 10:31:31.945 [ShardingSphere-Command-7] ShardingSphere-SQL - Logic SQL: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_i
 solation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:31.945 [ShardingSphere-Command-7] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@3984fdad, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=96, stopIndex=979, distinctRow=false, projections=[ExpressionProjection(expression=@@session.auto_increment_increment, alias=Optional[auto_increment_increment]), ExpressionProjection(expression=@@character_set_client, alias=Optional[character_set_client]), ExpressionProjection(expression=@@character_set_connection, alias=Optional[character_set_connection]), ExpressionProjection(expression=@@character_set_results, alias=Optional[character_set_results]), ExpressionProjection(expression=@@character_set_server, alias=Optional[character_set_server]), ExpressionProjection(expression=@@collation_server, alias=Optional[collation_serv
 er]), ExpressionProjection(expression=@@collation_connection, alias=Optional[collation_connection]), ExpressionProjection(expression=@@init_connect, alias=Optional[init_connect]), ExpressionProjection(expression=@@interactive_timeout, alias=Optional[interactive_timeout]), ExpressionProjection(expression=@@license, alias=Optional[license]), ExpressionProjection(expression=@@lower_case_table_names, alias=Optional[lower_case_table_names]), ExpressionProjection(expression=@@max_allowed_packet, alias=Optional[max_allowed_packet]), ExpressionProjection(expression=@@net_buffer_length, alias=Optional[net_buffer_length]), ExpressionProjection(expression=@@net_write_timeout, alias=Optional[net_write_timeout]), ExpressionProjection(expression=@@query_cache_size, alias=Optional[query_cache_size]), ExpressionProjection(expression=@@query_cache_type, alias=Optional[query_cache_type]), ExpressionProjection(expression=@@sql_mode, alias=Optional[sql_mode]), ExpressionProjection(expression=@@system_t
 ime_zone, alias=Optional[system_time_zone]), ExpressionProjection(expression=@@time_zone, alias=Optional[time_zone]), ExpressionProjection(expression=@@transaction_isolation, alias=Optional[transaction_isolation]), ExpressionProjection(expression=@@wait_timeout, alias=Optional[wait_timeout])]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@54629533, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@540f6334, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@7107bcab, containsSubquery=false)
   [INFO ] 10:31:31.946 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone
 , @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.081 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x620413bf, L:/0.0.0.0:3307] READ: [id: 0x7df76895, L:/10.10.10.206:3307 - R:/10.10.11.243:63545]
   [INFO ] 10:31:32.081 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x620413bf, L:/0.0.0.0:3307] READ COMPLETE
   [INFO ] 10:31:32.130 [ShardingSphere-Command-3] ShardingSphere-SQL - Logic SQL: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_i
 solation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.131 [ShardingSphere-Command-3] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4133a1be, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=96, stopIndex=979, distinctRow=false, projections=[ExpressionProjection(expression=@@session.auto_increment_increment, alias=Optional[auto_increment_increment]), ExpressionProjection(expression=@@character_set_client, alias=Optional[character_set_client]), ExpressionProjection(expression=@@character_set_connection, alias=Optional[character_set_connection]), ExpressionProjection(expression=@@character_set_results, alias=Optional[character_set_results]), ExpressionProjection(expression=@@character_set_server, alias=Optional[character_set_server]), ExpressionProjection(expression=@@collation_server, alias=Optional[collation_serv
 er]), ExpressionProjection(expression=@@collation_connection, alias=Optional[collation_connection]), ExpressionProjection(expression=@@init_connect, alias=Optional[init_connect]), ExpressionProjection(expression=@@interactive_timeout, alias=Optional[interactive_timeout]), ExpressionProjection(expression=@@license, alias=Optional[license]), ExpressionProjection(expression=@@lower_case_table_names, alias=Optional[lower_case_table_names]), ExpressionProjection(expression=@@max_allowed_packet, alias=Optional[max_allowed_packet]), ExpressionProjection(expression=@@net_buffer_length, alias=Optional[net_buffer_length]), ExpressionProjection(expression=@@net_write_timeout, alias=Optional[net_write_timeout]), ExpressionProjection(expression=@@query_cache_size, alias=Optional[query_cache_size]), ExpressionProjection(expression=@@query_cache_type, alias=Optional[query_cache_type]), ExpressionProjection(expression=@@sql_mode, alias=Optional[sql_mode]), ExpressionProjection(expression=@@system_t
 ime_zone, alias=Optional[system_time_zone]), ExpressionProjection(expression=@@time_zone, alias=Optional[time_zone]), ExpressionProjection(expression=@@transaction_isolation, alias=Optional[transaction_isolation]), ExpressionProjection(expression=@@wait_timeout, alias=Optional[wait_timeout])]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@6e49039f, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@4b96700c, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@30dc5366, containsSubquery=false)
   [INFO ] 10:31:32.132 [ShardingSphere-Command-3] ShardingSphere-SQL - Actual SQL: shadow_ds_1 ::: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone
 , @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - Logic SQL: select @@session.transaction_read_only
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@17bee019, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=7, stopIndex=37, distinctRow=false, projections=[ExpressionProjection(expression=@@session.transaction_read_only, alias=Optional.empty)]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@708105ff, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@7e2a5544, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@431418b6, containsSubquery=false)
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: select @@session.transaction_read_only
   [INFO ] 10:31:32.204 [ShardingSphere-Command-7] ShardingSphere-SQL - Logic SQL: insert into t_order(user_id,order_no,order_name,remark) values('1','123','book-master1','spy')
   [INFO ] 10:31:32.204 [ShardingSphere-Command-7] ShardingSphere-SQL - SQLStatement: InsertStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.InsertStatement@5227408a, tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=12, stopIndex=18, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)])), tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=12, stopIndex=18, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)]), columnNames=[user_id, order_no, order_name, remark], insertValueContexts=[InsertValueContext(parametersCount=0, valueExpressions=[LiteralExpressionSegment(startIndex=63, stopIndex=65, literals=1), LiteralExpressionSegment(startIndex=67, stopIndex=71, literals=123), LiteralExpressionSegment(startIndex=73, stopIndex=
 86, literals=book-master1), LiteralExpressionSegment(startIndex=88, stopIndex=92, literals=spy)], parameters=[])], insertSelectContext=null, onDuplicateKeyUpdateValueContext=null, generatedKeyContext=Optional.empty)
   [INFO ] 10:31:32.205 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: insert into t_order(user_id,order_no,order_name,remark) values('1', '123', 'book-master1', 'spy')
   [spy@mylab logs]$ 
   ````
   
   
   # promblem
   you see , it go to `shadow_ds_0`, but  `it should go to ds_1`
    
   
   


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



[GitHub] [shardingsphere] yanyzy commented on issue #6852: shadow=false ,but it route to shadow datasource

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


   The 4.1.1 version does not support shadow,  it will be release at 5.x.


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



[GitHub] [shardingsphere] tristaZero closed issue #6852: shadow=false ,but it route to shadow datasource

Posted by GitBox <gi...@apache.org>.
tristaZero closed issue #6852:
URL: https://github.com/apache/shardingsphere/issues/6852


   


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



[GitHub] [shardingsphere] Lucas-307 commented on issue #6852: shadow=false ,but it route to shadow datasource

Posted by GitBox <gi...@apache.org>.
Lucas-307 commented on issue #6852:
URL: https://github.com/apache/shardingsphere/issues/6852#issuecomment-674332348


   @spyvip Your Logic SQL include `shadow` field, so Actual SQL has.
   I guess, Your sharding-tables has different field list.(maybe ds0 include `shadow` field. but ds1 not). 
   Check it.


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



[GitHub] [shardingsphere] spyvip edited a comment on issue #6852: shadow=false ,but it route to shadow datasource

Posted by GitBox <gi...@apache.org>.
spyvip edited a comment on issue #6852:
URL: https://github.com/apache/shardingsphere/issues/6852#issuecomment-674338749


   > @spyvip Your Logic SQL include `shadow` field, so Actual SQL has.
   > I guess, Your sharding-tables has different field list.(maybe ds0 include `shadow` field. but ds1 not).
   > Check it.
   
   right? 
   I try 5.0.0.rc shardingsphere-proxy,it can remove `shadow` field, but it route wrong database when I use sharding and shadow both, config as flow
   
   # config-my.yaml
   
   ````
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/order0?serverTimezone=UTC&useSSL=false
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/order1?serverTimezone=UTC&useSSL=false
     shadow_ds_0:
       url: jdbc:mysql://127.0.0.1:3306/shadow_order0?serverTimezone=UTC&useSSL=false
     shadow_ds_1:
       url: jdbc:mysql://127.0.0.1:3306/shadow_order1?serverTimezone=UTC&useSSL=false
   rules:
   - !SHARDING
     defaultDatabaseStrategy:
       standard:
         shardingColumn: user_id
         shardingAlgorithmName: database_inline  
     shardingAlgorithms:
       database_inline:
         type: INLINE
         props:
           algorithm.expression: ds_${user_id % 2}
   
   - !SHADOW
     column: shadow
     shadowMappings:
       ds_0: shadow_ds_0
       ds_1: shadow_ds_1
   ````
   
   # my test sql
   ````
   String sql = "insert into t_order(user_id,order_no,order_name,remark) values('1','123','book-master1','spy')";
           jdbcTemplate.update(sql);
   ````
   
   #  stdout.log
   
   ````
   [INFO ] 10:31:31.945 [ShardingSphere-Command-7] ShardingSphere-SQL - Logic SQL: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_i
 solation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:31.945 [ShardingSphere-Command-7] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@3984fdad, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=96, stopIndex=979, distinctRow=false, projections=[ExpressionProjection(expression=@@session.auto_increment_increment, alias=Optional[auto_increment_increment]), ExpressionProjection(expression=@@character_set_client, alias=Optional[character_set_client]), ExpressionProjection(expression=@@character_set_connection, alias=Optional[character_set_connection]), ExpressionProjection(expression=@@character_set_results, alias=Optional[character_set_results]), ExpressionProjection(expression=@@character_set_server, alias=Optional[character_set_server]), ExpressionProjection(expression=@@collation_server, alias=Optional[collation_serv
 er]), ExpressionProjection(expression=@@collation_connection, alias=Optional[collation_connection]), ExpressionProjection(expression=@@init_connect, alias=Optional[init_connect]), ExpressionProjection(expression=@@interactive_timeout, alias=Optional[interactive_timeout]), ExpressionProjection(expression=@@license, alias=Optional[license]), ExpressionProjection(expression=@@lower_case_table_names, alias=Optional[lower_case_table_names]), ExpressionProjection(expression=@@max_allowed_packet, alias=Optional[max_allowed_packet]), ExpressionProjection(expression=@@net_buffer_length, alias=Optional[net_buffer_length]), ExpressionProjection(expression=@@net_write_timeout, alias=Optional[net_write_timeout]), ExpressionProjection(expression=@@query_cache_size, alias=Optional[query_cache_size]), ExpressionProjection(expression=@@query_cache_type, alias=Optional[query_cache_type]), ExpressionProjection(expression=@@sql_mode, alias=Optional[sql_mode]), ExpressionProjection(expression=@@system_t
 ime_zone, alias=Optional[system_time_zone]), ExpressionProjection(expression=@@time_zone, alias=Optional[time_zone]), ExpressionProjection(expression=@@transaction_isolation, alias=Optional[transaction_isolation]), ExpressionProjection(expression=@@wait_timeout, alias=Optional[wait_timeout])]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@54629533, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@540f6334, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@7107bcab, containsSubquery=false)
   [INFO ] 10:31:31.946 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone
 , @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.081 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x620413bf, L:/0.0.0.0:3307] READ: [id: 0x7df76895, L:/10.10.10.206:3307 - R:/10.10.11.243:63545]
   [INFO ] 10:31:32.081 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x620413bf, L:/0.0.0.0:3307] READ COMPLETE
   [INFO ] 10:31:32.130 [ShardingSphere-Command-3] ShardingSphere-SQL - Logic SQL: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_i
 solation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.131 [ShardingSphere-Command-3] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4133a1be, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=96, stopIndex=979, distinctRow=false, projections=[ExpressionProjection(expression=@@session.auto_increment_increment, alias=Optional[auto_increment_increment]), ExpressionProjection(expression=@@character_set_client, alias=Optional[character_set_client]), ExpressionProjection(expression=@@character_set_connection, alias=Optional[character_set_connection]), ExpressionProjection(expression=@@character_set_results, alias=Optional[character_set_results]), ExpressionProjection(expression=@@character_set_server, alias=Optional[character_set_server]), ExpressionProjection(expression=@@collation_server, alias=Optional[collation_serv
 er]), ExpressionProjection(expression=@@collation_connection, alias=Optional[collation_connection]), ExpressionProjection(expression=@@init_connect, alias=Optional[init_connect]), ExpressionProjection(expression=@@interactive_timeout, alias=Optional[interactive_timeout]), ExpressionProjection(expression=@@license, alias=Optional[license]), ExpressionProjection(expression=@@lower_case_table_names, alias=Optional[lower_case_table_names]), ExpressionProjection(expression=@@max_allowed_packet, alias=Optional[max_allowed_packet]), ExpressionProjection(expression=@@net_buffer_length, alias=Optional[net_buffer_length]), ExpressionProjection(expression=@@net_write_timeout, alias=Optional[net_write_timeout]), ExpressionProjection(expression=@@query_cache_size, alias=Optional[query_cache_size]), ExpressionProjection(expression=@@query_cache_type, alias=Optional[query_cache_type]), ExpressionProjection(expression=@@sql_mode, alias=Optional[sql_mode]), ExpressionProjection(expression=@@system_t
 ime_zone, alias=Optional[system_time_zone]), ExpressionProjection(expression=@@time_zone, alias=Optional[time_zone]), ExpressionProjection(expression=@@transaction_isolation, alias=Optional[transaction_isolation]), ExpressionProjection(expression=@@wait_timeout, alias=Optional[wait_timeout])]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@6e49039f, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@4b96700c, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@30dc5366, containsSubquery=false)
   [INFO ] 10:31:32.132 [ShardingSphere-Command-3] ShardingSphere-SQL - Actual SQL: shadow_ds_1 ::: /* mysql-connector-java-5.1.47 ( Revision: fe1903b1ecb4a96a917f7ed3190d80c049b1de29 ) */SELECT  @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone
 , @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - Logic SQL: select @@session.transaction_read_only
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@17bee019, tablesContext=TablesContext(tables=[])), tablesContext=TablesContext(tables=[]), projectionsContext=ProjectionsContext(startIndex=7, stopIndex=37, distinctRow=false, projections=[ExpressionProjection(expression=@@session.transaction_read_only, alias=Optional.empty)]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@708105ff, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@7e2a5544, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@431418b6, containsSubquery=false)
   [INFO ] 10:31:32.183 [ShardingSphere-Command-6] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: select @@session.transaction_read_only
   [INFO ] 10:31:32.204 [ShardingSphere-Command-7] ShardingSphere-SQL - Logic SQL: insert into t_order(user_id,order_no,order_name,remark) values('1','123','book-master1','spy')
   [INFO ] 10:31:32.204 [ShardingSphere-Command-7] ShardingSphere-SQL - SQLStatement: InsertStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.InsertStatement@5227408a, tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=12, stopIndex=18, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)])), tablesContext=TablesContext(tables=[SimpleTableSegment(tableName=TableNameSegment(startIndex=12, stopIndex=18, identifier=IdentifierValue(value=t_order, quoteCharacter=NONE)), owner=Optional.empty, alias=Optional.empty)]), columnNames=[user_id, order_no, order_name, remark], insertValueContexts=[InsertValueContext(parametersCount=0, valueExpressions=[LiteralExpressionSegment(startIndex=63, stopIndex=65, literals=1), LiteralExpressionSegment(startIndex=67, stopIndex=71, literals=123), LiteralExpressionSegment(startIndex=73, stopIndex=
 86, literals=book-master1), LiteralExpressionSegment(startIndex=88, stopIndex=92, literals=spy)], parameters=[])], insertSelectContext=null, onDuplicateKeyUpdateValueContext=null, generatedKeyContext=Optional.empty)
   [INFO ] 10:31:32.205 [ShardingSphere-Command-7] ShardingSphere-SQL - Actual SQL: shadow_ds_0 ::: insert into t_order(user_id,order_no,order_name,remark) values('1', '123', 'book-master1', 'spy')
   [spy@mylab logs]$ 
   ````
   
   
   # problem
   you see , it go to `shadow_ds_0`, but  `it should go to ds_1`
    
   
   


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