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/06/22 12:53:12 UTC

[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #18517: Add show result write_data_source_query_enable for show readwrite_splitting rules

RaigorJiang commented on code in PR #18517:
URL: https://github.com/apache/shardingsphere/pull/18517#discussion_r903704720


##########
docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.en.md:
##########
@@ -11,46 +11,36 @@ SHOW READWRITE_SPLITTING RULES [FROM databaseName]
 
 ## Return Value Description
 
-| Column                      | Description                          |
-| --------------------------- | ------------------------------------ |
-| name                        | Rule name                            |
-| auto_aware_data_source_name | Auto-Aware discovery data source name (Display configuration dynamic readwrite splitting rules) |
-| write_data_source_name      | Write data source name                |
-| read_data_source_names      | Read data source name list            |
-| load_balancer_type          | Load balance algorithm type           |
-| load_balancer_props         | Load balance algorithm parameter      |
+| Column                          | Description                          |
+| ------------------------------- | ------------------------------------ |
+| name                            | Rule name                            |
+| auto_aware_data_source_name     | Auto-Aware discovery data source name (Display configuration dynamic readwrite splitting rules) |
+| write_data_source_query_enabled | all replicas offline, primary data source whether provide query (Display configuration dynamic readwrite splitting rules)|
+| write_data_source_name          | Write data source name                |
+| read_data_source_names          | Read data source name list            |
+| load_balancer_type              | Load balance algorithm type           |
+| load_balancer_props             | Load balance algorithm parameter      |
 
 ## Example
 
 *Static Readwrite Splitting Rules*
 ```sql
 mysql> show readwrite_splitting rules;
-+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| name       | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
-+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| ms_group_0 |                             | ds_primary             | ds_slave_0, ds_slave_1 | random             |                     |
-+------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-1 row in set (0.00 sec)
-```
-
-*Dynamic Readwrite Splitting Rules*
-```sql
-mysql> show readwrite_splitting rules from readwrite_splitting_db;
-+--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| name         | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
-+--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| readwrite_ds | ms_group_0                  |                        |                        | random             | read_weight=2:1     |
-+-------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
++--------------+-----------------------------+---------------------------------+------------------------+------------------------+--------------------+
+| name         | auto_aware_data_source_name | write_data_source_query_enabled | write_data_source_name | read_data_source_names | load_balancer_type | 
++--------------+-----------------------------+---------------------------------+------------------------+------------------------+--------------------+
+| ms_group_0   |                             |                                 | ds_primary             | ds_slave_0,ds_slave_1  | RANDOM             |
++--------------+-----------------------------+---------------------------------+------------------------+------------------------+--------------------+
 1 row in set (0.01 sec)
 ```
 
-*Static Readwrite Splitting Rules And Dynamic Readwrite Splitting Rules*
+*Dynamic Readwrite Splitting Rules*
 ```sql
 mysql> show readwrite_splitting rules from readwrite_splitting_db;
-+--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| name         | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
-+--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| readwrite_ds | ms_group_0                  | write_ds               | read_ds_0, read_ds_1   | random             | read_weight=2:1     |
-+-------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
++----------------+-----------------------------+---------------------------------+------------------------+------------------------+--------------------+---------------------+
+| name           | auto_aware_data_source_name | write_data_source_query_enabled | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
++----------------+-----------------------------+---------------------------------+------------------------+------------------------+--------------------+---------------------+
+| readwrite_ds   | ms_group_0                  | true                            | ds_primary             | ds_slave_0,ds_slave_1  |  random            | read_weight=2:1     |

Review Comment:
   Hi @zjcnb , the random load balancer dose not need props.



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