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 2021/11/04 09:04:27 UTC

[GitHub] [shardingsphere] chengh1 opened a new issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

chengh1 opened a new issue #13461:
URL: https://github.com/apache/shardingsphere/issues/13461


   ## 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?
   5.0.0-RC1-SNAPSHOT
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-Proxy
   
   ### Expected behavior
   The proxy is not restarted after modifying the table structure without proxy,  the all fields of the returned queryheader are from the same column, and the returned columns are not expected.
   
   ### Actual behavior
   The proxy is not restarted after modifying the table structure without proxy,  the all fields of the returned queryheader are not from the same column, and the returned columns arenot expected.
   
   ### Reason analyze (If you can)
   ![image](https://user-images.githubusercontent.com/39934378/140273501-e0ccf66a-fcc2-4b2f-bcac-f13cd5e4955b.png)
   The parameter columnName and columnIndex of the build method comes from the projectionsContext of executionContext, they are all comes from metadata, but the other fields of the queryheader are all from queryResultMetaData by columnIndex, so if the field's index in proxy meta and queryresult is different, then will cause  the all fields of the returned queryheader are not from the same column, and the returned columns are not expected.
   
   **If we want to avoid this problem, we should ensure that the columnIndex is the actual index in the queryresult,this will ensure that all fields of the queryheader are from the same column, and the returned columns are expected.**
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   **There is a single table t_user, it has three fields, they are id, name, age. Sharding table has the same problem.**
   
   1. start the proxy.
   2. add a new column birthday after id, then the actual column are id, birthday, name, age.
   3.  assuming that proxy is not restarted at this time,  execute the sql:  select * from t_user, at this time, there are some problems:
    
   
   - the all fields of the returned queryheader are not from the same column
   ![image](https://user-images.githubusercontent.com/39934378/140282626-a28b3011-ea43-4697-a323-63f3078fd727.png)
   ![image](https://user-images.githubusercontent.com/39934378/140282024-e65bccd4-c707-4f3a-8abc-5e1f9e435a3a.png)
   
   - the returned columns are not expected
   ![image](https://user-images.githubusercontent.com/39934378/140285512-0b619787-640d-435e-aea6-59c92ab9568f.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.

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

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



[GitHub] [shardingsphere] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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






-- 
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] chengh1 edited a comment on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > DDL should be executed in Proxy, otherwise the meta data will be inconsistent.
   
   If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now? @TeslaCN 
   


-- 
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] chengh1 commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > > If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now? @TeslaCN
   > 
   > If you execute DDL in cluster, the meta data will be updated immediately.
   
   There is a certain delay in the meta update of all instances. In the case of high concurrency, during the period before all meta updates, there may be the problems mentioned above.Does the proxy deal with this situation?  @TeslaCN 


-- 
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] chengh1 commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > > If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now? @TeslaCN
   > 
   > If you execute DDL in cluster, the meta data will be updated immediately.
   
   There is a certain delay in the meta update of all instances. In the case of high concurrency, during the period before all meta updates, there may be the problems mentioned above.Does the proxy deal with this situation?  @TeslaCN 


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now? @TeslaCN
   
   If you execute DDL in cluster, the meta data will be updated immediately.
   
   


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > There is a certain delay in the meta update of all instances. In the case of high concurrency, during the period before all meta updates, there may be the problems mentioned above.Does the proxy deal with this situation? @TeslaCN
   
   Could you tell me something about your scenario? Why would you execute DDL when your services are busy?


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   Close due to no response.


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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






-- 
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] chengh1 commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > DDL should be executed in Proxy, otherwise the meta data will be inconsistent.
   
   If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now?
   


-- 
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] chengh1 commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   > > If we execute ddl in the cluster, before all nodes are aware of the latest metadata, the sql executed at this time may have the problems mentioned above. How does shardingSphere solve it now? @TeslaCN
   > 
   > If you execute DDL in cluster, the meta data will be updated immediately.
   
   There is a certain delay in the meta update of all instances. In the case of high concurrency, during the period before all meta updates, there may be the problems mentioned above.Does the proxy deal with this situation?  @TeslaCN 


-- 
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] TeslaCN closed issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   Hi @chengh1
   Are we done here?


-- 
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] TeslaCN commented on issue #13461: The proxy is not restarted after modifying the table structure without proxy, returned queryheader and columns are not expected

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


   DDL should be executed in Proxy, otherwise the meta data will be inconsistent.


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