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/10/23 07:00:05 UTC

[GitHub] [shardingsphere] jiangML opened a new pull request, #21699: Refactor some READWRITE_SPLITTING related syntax #21694

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

   Fixes #21694.
   
   Changes proposed in this pull request:
   - SHOW READWRITE_SPLITTING READ RESOURCES ->  SHOW STATUS FROM READWRITE_SPLITTING RULES 
   - Add new syntax: `SHOW STATUS FROM READWRITE_SPLITTING RULE groupName`
   - DISABLE READWRITE_SPLITTING resourceName -> ALTER READWRITE_SPLITTING RULE groupName DISABLE resourceName
   - ENABLE READWRITE_SPLITTING resourceName -> ALTER READWRITE_SPLITTING RULE groupName ENABLE resourceName
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [ ] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [ ] 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 : `mvn clean install -B -T2C -DskipTests -Dmaven.javadoc.skip=true -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 #21699: Refactor some READWRITE_SPLITTING related syntax #21694

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


##########
features/readwrite-splitting/distsql/parser/src/main/antlr4/imports/readwrite-splitting/RALStatement.g4:
##########
@@ -31,16 +31,12 @@ clearReadwriteSplittingHint
     : CLEAR READWRITE_SPLITTING HINT
     ;
 
-enableReadDataSource
-    : ENABLE READWRITE_SPLITTING (READ)? resourceName (FROM databaseName)?
+alterReadwriteSplittingRuleStatus
+    : ALTER READWRITE_SPLITTING RULE (groupName)? (ENABLE | DISABLE) resourceName (FROM databaseName)?

Review Comment:
   I suggest that groupName is not optional, the user should be clear which rule they are modifying



-- 
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] jiangML commented on a diff in pull request #21699: Refactor some READWRITE_SPLITTING related syntax #21694

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


##########
docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md:
##########
@@ -35,12 +35,12 @@ RAL (Resource & Rule Administration Language) 为 Apache ShardingSphere 的管
 
 ## 熔断
 
-| 语句                                                                             | 说明                 | 示例                                        |
-| :------------------------------------------------------------------------------ | :------------------- | :----------------------------------------- |
-| [ENABLE / DISABLE] READWRITE_SPLITTING (READ)? resourceName [FROM databaseName] | 启用 / 禁用读库        | ENABLE READWRITE_SPLITTING READ resource_0 |
-| [ENABLE / DISABLE] INSTANCE instanceId                                          | 启用 / 禁用 proxy 实例 | DISABLE INSTANCE instance_1                |
-| SHOW INSTANCE LIST                                                              | 查询 proxy 实例信息    | SHOW INSTANCE LIST                         |
-| SHOW READWRITE_SPLITTING (READ)? resourceName [FROM databaseName]               | 查询所有读库的状态      | SHOW READWRITE_SPLITTING READ RESOURCES    |
+| 语句                                                                                               | 说明                                  | 示例                                                            |
+|:-------------------------------------------------------------------------------------------------|:------------------------------------|:--------------------------------------------------------------|
+| ALTER READWRITE_SPLITTING RULE [ groupName ] (ENABLE / DISABLE) resourceName [FROM databaseName] | 启用 / 禁用全部规则或指定规则内读库        | ALTER READWRITE_SPLITTING RULE group_1 ENABLE resource_0      |

Review Comment:
   Ok, let me adjust the document description



-- 
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 #21699: Refactor some READWRITE_SPLITTING related syntax #21694

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


-- 
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] codecov-commenter commented on pull request #21699: Refactor some READWRITE_SPLITTING related syntax #21694

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #21699:
URL: https://github.com/apache/shardingsphere/pull/21699#issuecomment-1288043184

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/21699?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#21699](https://codecov.io/gh/apache/shardingsphere/pull/21699?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a7cd66e) into [master](https://codecov.io/gh/apache/shardingsphere/commit/63f8a4f297b15910ee3d69cf167235272da010bc?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (63f8a4f) will **decrease** coverage by `0.00%`.
   > The diff coverage is `5.88%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #21699      +/-   ##
   ============================================
   - Coverage     61.02%   61.01%   -0.01%     
     Complexity     2505     2505              
   ============================================
     Files          4111     4111              
     Lines         57375    57384       +9     
     Branches       9696     9698       +2     
   ============================================
     Hits          35013    35013              
   - Misses        19455    19464       +9     
     Partials       2907     2907              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/21699?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ore/ReadwriteSplittingDistSQLStatementVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvcmVhZHdyaXRlLXNwbGl0dGluZy9kaXN0c3FsL3BhcnNlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2Rpc3RzcWwvcGFyc2VyL2NvcmUvUmVhZHdyaXRlU3BsaXR0aW5nRGlzdFNRTFN0YXRlbWVudFZpc2l0b3IuamF2YQ==) | `41.02% <0.00%> (-3.42%)` | :arrow_down: |
   | [.../ShowReadwriteSplittingReadResourcesStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvcmVhZHdyaXRlLXNwbGl0dGluZy9kaXN0c3FsL3N0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2Rpc3RzcWwvcGFyc2VyL3N0YXRlbWVudC9TaG93UmVhZHdyaXRlU3BsaXR0aW5nUmVhZFJlc291cmNlc1N0YXRlbWVudC5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...t/status/SetReadwriteSplittingStatusStatement.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvcmVhZHdyaXRlLXNwbGl0dGluZy9kaXN0c3FsL3N0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcmVhZHdyaXRlc3BsaXR0aW5nL2Rpc3RzcWwvcGFyc2VyL3N0YXRlbWVudC9zdGF0dXMvU2V0UmVhZHdyaXRlU3BsaXR0aW5nU3RhdHVzU3RhdGVtZW50LmphdmE=) | `0.00% <ø> (ø)` | |
   | [...le/ShowReadwriteSplittingReadResourcesHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2Rpc3RzcWwvcmFsL3F1ZXJ5YWJsZS9TaG93UmVhZHdyaXRlU3BsaXR0aW5nUmVhZFJlc291cmNlc0hhbmRsZXIuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../updatable/SetReadwriteSplittingStatusHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cHJveHkvYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2Rpc3RzcWwvcmFsL3VwZGF0YWJsZS9TZXRSZWFkd3JpdGVTcGxpdHRpbmdTdGF0dXNIYW5kbGVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...eterized/jaxb/cases/domain/SQLParserTestCases.java](https://codecov.io/gh/apache/shardingsphere/pull/21699/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9wYXJhbWV0ZXJpemVkL2pheGIvY2FzZXMvZG9tYWluL1NRTFBhcnNlclRlc3RDYXNlcy5qYXZh) | `99.31% <100.00%> (ø)` | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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 #21699: Refactor some READWRITE_SPLITTING related syntax #21694

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


##########
docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/ral/_index.cn.md:
##########
@@ -35,12 +35,12 @@ RAL (Resource & Rule Administration Language) 为 Apache ShardingSphere 的管
 
 ## 熔断
 
-| 语句                                                                             | 说明                 | 示例                                        |
-| :------------------------------------------------------------------------------ | :------------------- | :----------------------------------------- |
-| [ENABLE / DISABLE] READWRITE_SPLITTING (READ)? resourceName [FROM databaseName] | 启用 / 禁用读库        | ENABLE READWRITE_SPLITTING READ resource_0 |
-| [ENABLE / DISABLE] INSTANCE instanceId                                          | 启用 / 禁用 proxy 实例 | DISABLE INSTANCE instance_1                |
-| SHOW INSTANCE LIST                                                              | 查询 proxy 实例信息    | SHOW INSTANCE LIST                         |
-| SHOW READWRITE_SPLITTING (READ)? resourceName [FROM databaseName]               | 查询所有读库的状态      | SHOW READWRITE_SPLITTING READ RESOURCES    |
+| 语句                                                                                               | 说明                                  | 示例                                                            |
+|:-------------------------------------------------------------------------------------------------|:------------------------------------|:--------------------------------------------------------------|
+| ALTER READWRITE_SPLITTING RULE [ groupName ] (ENABLE / DISABLE) resourceName [FROM databaseName] | 启用 / 禁用全部规则或指定规则内读库        | ALTER READWRITE_SPLITTING RULE group_1 ENABLE resource_0      |

Review Comment:
   The read storage unit between different groups will not be repeated, so in fact only one can be disabled 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