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 2022/12/28 07:54:35 UTC

[GitHub] [shardingsphere] Qianyi951015 opened a new pull request, #23134: Add IF NOT EXISTS to all CREATE statements in DistSQL documents

Qianyi951015 opened a new pull request, #23134:
URL: https://github.com/apache/shardingsphere/pull/23134

   Update DistSQL documents for #22844.
   
   #### BTW: Before merging this pull request, please make sure all tasks have been done in #22844 
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [ ] I have added corresponding unit tests for my changes.
   


-- 
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 a diff in pull request #23134: Add IF NOT EXISTS to all CREATE statements in DistSQL documents

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #23134:
URL: https://github.com/apache/shardingsphere/pull/23134#discussion_r1058665871


##########
docs/document/content/reference/distsql/syntax/rdl/rule-definition/readwrite-splitting/create-readwrite-splitting-rule.cn.md:
##########
@@ -79,6 +83,28 @@ CREATE READWRITE_SPLITTING RULE ms_group_1 (
 );
 ```
 
+#### 使用 `ifNotExists` 子句创建读写分离规则
+
+- 静态读写分离规则
+
+```sql
+CREATE READWRITE_SPLITTING RULE IF NOT EXISTS ms_group_0 (
+    WRITE_STORAGE_UNIT=write_ds,
+    READ_STORAGE_UNITS(read_ds_0,read_ds_1),
+    TYPE(NAME="random")
+);
+```
+
+- 动态读写分离规则
+
+```sql
+CREATE READWRITE_SPLITTING RULE IF NOT EXISTS ms_group_1 (
+    AUTO_AWARE_RESOURCE=group_0,
+    WRITE_DATA_SOURCE_QUERY_ENABLED=false,
+    TYPE(NAME="random",PROPERTIES("read_weight"="2:1"))

Review Comment:
   Random algorithm does need properties, please remove 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 merged pull request #23134: Add IF NOT EXISTS to all CREATE statements in DistSQL documents

Posted by GitBox <gi...@apache.org>.
RaigorJiang merged PR #23134:
URL: https://github.com/apache/shardingsphere/pull/23134


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