-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: refine placement rule in sql docs #15190
Merged
Merged
Changes from 46 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
83c5af4
*: refine placement rule in sql
nolouch 58ff756
fix
nolouch e025712
Update placement-rules-in-sql.md
nolouch b14461f
fix
nolouch 13bfbfe
fix
nolouch 6b6206d
replace rule to policy
nolouch 233fde7
address
nolouch 731db43
address
nolouch e9156ba
Update placement-rules-in-sql.md
nolouch 1b50d02
address
nolouch c4cc258
Merge remote-tracking branch 'nolouch/improve-ruleinsql' into improve…
nolouch 555013f
refine the structure and descriptions
qiancai 716e7ee
Update placement-rules-in-sql.md
qiancai 203c6af
Update placement-rules-in-sql.md
nolouch 73a5e05
Update placement-rules-in-sql.md
nolouch 35a7363
Update placement-rules-in-sql.md
nolouch c40f08a
Update placement-rules-in-sql.md
nolouch 75f8c8b
Update placement-rules-in-sql.md
nolouch 2906f13
Update placement-rules-in-sql.md
nolouch f2e63b8
Update placement-rules-in-sql.md
nolouch 7163311
Update placement-rules-in-sql.md
nolouch a173123
Update placement-rules-in-sql.md
nolouch 8cc7418
Update placement-rules-in-sql.md
nolouch ace7e72
fix a broken link
qiancai a220ee7
update
nolouch 6e18cfe
Merge remote-tracking branch 'nolouch/improve-ruleinsql' into improve…
nolouch 167e67c
Update placement-rules-in-sql.md
nolouch 1b5997f
Update placement-rules-in-sql.md
nolouch 512cfe6
Update placement-rules-in-sql.md
nolouch 00b3e5e
update
nolouch 3c84fc8
Merge remote-tracking branch 'nolouch/improve-ruleinsql' into improve…
nolouch bf4e48e
update
nolouch 8b90b01
Update placement-rules-in-sql.md
nolouch b052fc0
Update placement-rules-in-sql.md
nolouch e946a2f
Update sql-statements/sql-statement-alter-range.md
nolouch 840ebce
Update placement-rules-in-sql.md
nolouch d380d85
Update sql-statements/sql-statement-alter-range.md
nolouch a0fcdb4
Update sql-statements/sql-statement-alter-range.md
nolouch 9a113da
Update sql-statements/sql-statement-alter-range.md
nolouch 593b606
address
nolouch f732d26
Update placement-rules-in-sql.md
nolouch 7192c5e
Update placement-rules-in-sql.md
nolouch 594394d
Update placement-rules-in-sql.md
nolouch 8034385
Update placement-rules-in-sql.md
nolouch cb39593
address
nolouch 3ec9f49
Merge remote-tracking branch 'nolouch/improve-ruleinsql' into improve…
nolouch e9285bb
Update placement-rules-in-sql.md
nolouch 5331b15
Update placement-rules-in-sql.md
nolouch e6ae990
Update placement-rules-in-sql.md
nolouch c9dcdb2
Update placement-rules-in-sql.md
nolouch 4a9d4ab
Update sql-statements/sql-statement-alter-range.md
nolouch c7526b7
Update sql-statements/sql-statement-alter-range.md
nolouch f492461
Update placement-rules-in-sql.md
nolouch 0b86405
Update placement-rules-in-sql.md
nolouch 8c44732
Update placement-rules-in-sql.md
nolouch 8bd7285
Update placement-rules-in-sql.md
nolouch 273aa78
Update placement-rules-in-sql.md
nolouch e810196
Update placement-rules-in-sql.md
nolouch e8b00ac
Update placement-rules-in-sql.md
nolouch 35b7047
Update placement-rules-in-sql.md
nolouch 2c7bc62
Update placement-rules-in-sql.md
nolouch b1baeaf
Update placement-rules-in-sql.md
nolouch 19be375
Update placement-rules-in-sql.md
nolouch 56251bf
address
nolouch 5a7eaa2
fix format issues
qiancai 32865e6
Update sql-statements/sql-statement-alter-range.md
nolouch 26c3bb8
Update sql-statements/sql-statement-alter-range.md
nolouch a9b9d5a
Update release-6.3.0.md
qiancai 6d72524
Update placement-rules-in-sql.md
qiancai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: ALTER RANGE | ||
summary: TiDB 数据库中 ALTER RANGE 的使用概况。 | ||
--- | ||
|
||
hfxsd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# ALTER RANGE | ||
|
||
`ALTER RANGE` 语句目前仅用于修改 TiDB 数据库中指定范围的放置策略。 | ||
|
||
## 语法图 | ||
|
||
```ebnf+diagram | ||
AlterRangeStmt ::= | ||
'ALTER' 'RANGE' Identifier PlacementPolicyOption | ||
``` | ||
|
||
目前 `ALTER RANGE` 能起作用的有 `global` 和 `meta` 两个参数: | ||
|
||
- `global`: 表示集群内全域数据的范围 | ||
- `meta`: 表示 TiDB 内部存储的元信息的数据范围 | ||
nolouch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## 示例 | ||
nolouch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
```sql | ||
CREATE PLACEMENT POLICY `deploy111` CONSTRAINTS='{"+region=us-east-1":1, "+region=us-east-2": 1, "+region=us-west-1": 1}'; | ||
CREATE PLACEMENT POLICY `five_replicas` FOLLOWERS=4; | ||
|
||
ALTER RANGE global PLACEMENT POLICY = "deploy221"; | ||
nolouch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ALTER RANGE global PLACEMENT POLICY = "five_replicas"; | ||
nolouch marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
上述示例创建了一个名为 `deploy221` 和 `five_replicas` 的放置策略,为不同的区域指定了约束条件。然后将 `deploy111` 放置策略应用到了整个集群范围内的数据,将 `five_replicas` 放置策略应用到元数据范围内。 | ||
nolouch marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按字母顺序排列,需要放到
ALTER RESOURCE GROUP
前面