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/09/01 12:33:03 UTC

[GitHub] [shardingsphere] gc06 opened a new issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read? T

gc06 opened a new issue #12158:
URL: https://github.com/apache/shardingsphere/issues/12158


   The configuration is disabled by default. If this configuration is set to enabled, subsequent reads can be sent to read data nodes even if DML operations are performed on the current thread.
   
   https://shardingsphere.apache.org/document/current/cn/features/readwrite-splitting/use-norms/
   In the same thread and the same database connection, if there is a write operation, subsequent read operations will be read from the main library to ensure data consistency;


-- 
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] RaigorJiang commented on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   Hello everyone, 
   I have thought of a few more configuration plans, which may be better than what I said before.
   In general, put the new configuration into the readwrite-splitting rule:
   1. Plan A
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.consistency.enable=true
   ```
   2. Plan B
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.strong-consistency=true
   ```
   3. Plan C
   ```
   # default value is standard
   shardingsphere.rules.readwrite-splitting.router-mode=standard
   shardingsphere.rules.readwrite-splitting.router-mode=consistency
   ```
   
   I think plan A will be better, so I will start with 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.

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

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



[GitHub] [shardingsphere] RaigorJiang commented on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   Thanks for the suggestion of @tristaZero , `consistency-enabled` has been adjusted to `query-consistent `.


-- 
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] RaigorJiang edited a comment on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   Hello everyone, 
   I have thought of a few more configuration plans, which may be better than what I said before.
   In general, put the new configuration into the readwrite-splitting rule:
   
   1. Plan A
   ```
   # default value is false
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.consistency-enabled=true
   # the same level with load-balancer-name
   spring.shardingsphere.rules.readwrite-splitting.data-sources.ds-0.load-balancer-name=round_robin
   ```
   
   2. Plan B
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.props.consistency-enabled=true
   ```
   3. Plan C
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.props.strong-consistency=true
   ```
   4. Plan D
   ```
   # default value is standard
   shardingsphere.rules.readwrite-splitting.props.router-mode=standard
   shardingsphere.rules.readwrite-splitting.props.router-mode=consistency
   ```
   
   I think plan A will be better, so I will start with 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.

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

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



[GitHub] [shardingsphere] tristaZero closed issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   


-- 
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] RaigorJiang commented on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   This is a very good idea.
   According to the document description:
   > If there is write operation in the same thread and database connection, all the following read operations are from the primary database to ensure data consistency;
   
   #### But considering the scenarios where threads and connections are reused, this feature is likely to cause confusion for users.
   
   I agree with the idea of adding a configuration, for example:
   `props.readwrite-splitting.strong-consistency = true`
   
   like:
   
   `props.sql-show = true`
   
   When `readwrite-splitting.strong-consistency` is `true`, it works like currently described.
   When `readwrite-splitting.strong-consistency` is `false`, no matter whether there is a write operation or not, the select statement is routed to the read nodes.
   
   As for the default value of the configuration is true or false, it needs to be discussed. I prefer the default value to false.
   
   @tristaZero @terrymanu   Please hava a see.


-- 
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] RaigorJiang edited a comment on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   Hello everyone, 
   I have thought of a few more configuration plans, which may be better than what I said before.
   In general, put the new configuration into the readwrite-splitting rule:
   1. Plan A
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.props.consistency-enabled=true
   ```
   2. Plan B
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.props.strong-consistency=true
   ```
   3. Plan C
   ```
   # default value is standard
   shardingsphere.rules.readwrite-splitting.props.router-mode=standard
   shardingsphere.rules.readwrite-splitting.props.router-mode=consistency
   ```
   
   I think plan A will be better, so I will start with 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.

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

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



[GitHub] [shardingsphere] RaigorJiang edited a comment on issue #12158: Can READ/write separation feature add a configuration to allow inconsistent read?

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


   Hello everyone, 
   I have thought of a few more configuration plans, which may be better than what I said before.
   In general, put the new configuration into the readwrite-splitting rule:
   1. Plan A
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.consistency-enabled=true
   ```
   2. Plan B
   ```
   # default value is false
   shardingsphere.rules.readwrite-splitting.strong-consistency=true
   ```
   3. Plan C
   ```
   # default value is standard
   shardingsphere.rules.readwrite-splitting.router-mode=standard
   shardingsphere.rules.readwrite-splitting.router-mode=consistency
   ```
   
   I think plan A will be better, so I will start with 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.

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

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