Skip to content

Commit 38eb17c

Browse files
committed
address comments
Signed-off-by: nolouch <nolouch@gmail.com>
1 parent 096edb5 commit 38eb17c

File tree

5 files changed

+6377
-6369
lines changed

5 files changed

+6377
-6369
lines changed

ddl/ddl_api.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -3047,9 +3047,12 @@ func SetDirectResourceGroupUnit(resourceGroupSettings *model.ResourceGroupSettin
30473047
case ast.ResourceUnitIOWriteBandwidth:
30483048
resourceGroupSettings.IOWriteBandwidth = stringVal
30493049
case ast.ResourceBurstableOpiton:
3050+
// Some about BurstLimit(b):
3051+
// - If b == 0, that means the limiter is unlimited capacity. default use in resource controller (burst with a rate within a unlimited capacity).
3052+
// - If b < 0, that means the limiter is unlimited capacity and filerate(r) is ignored, can be seen as r == Inf (burst with a inf rate within a unlimited capacity).
3053+
// - If b > 0, that means the limiter is limited capacity. (current not used).
30503054
limit := int64(0)
30513055
if boolValue {
3052-
// negative means no limit within burst setting.
30533056
limit = -1
30543057
}
30553058
resourceGroupSettings.BurstLimit = limit

parser/ast/ddl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2149,7 +2149,7 @@ func (n *ResourceGroupOption) Restore(ctx *format.RestoreCtx) error {
21492149
ctx.WritePlain("= ")
21502150
ctx.WriteString(n.StrValue)
21512151
case ResourceBurstableOpiton:
2152-
ctx.WriteKeyWord("BURSTABLE ")
2152+
ctx.WriteKeyWord("BURSTABLE")
21532153
default:
21542154
return errors.Errorf("invalid PlacementOption: %d", n.Tp)
21552155
}

0 commit comments

Comments
 (0)