Skip to content

Commit

Permalink
config: Unify the style for storage quota config name (pingcap#16431)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yisaer authored Apr 16, 2020
1 parent b48bd30 commit b2f5921
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ type Config struct {
MemQuotaQuery int64 `toml:"mem-quota-query" json:"mem-quota-query"`
// TempStorageQuota describe the temporary storage Quota during query exector when OOMUseTmpStorage is enabled
// If the quota exceed the capacity of the TempStoragePath, the tidb-server would exit with fatal error
TempStorageQuota int64 `toml:"temp-storage-quota" json:"temp-storage-quota"` // Bytes
TempStorageQuota int64 `toml:"tmp-storage-quota" json:"tmp-storage-quota"` // Bytes
EnableStreaming bool `toml:"enable-streaming" json:"enable-streaming"`
EnableBatchDML bool `toml:"enable-batch-dml" json:"enable-batch-dml"`
TxnLocalLatches TxnLocalLatches `toml:"-" json:"-"`
Expand Down
6 changes: 3 additions & 3 deletions config/config.toml.example
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ oom-use-tmp-storage = true
# tmp-storage-path = "/tmp/tidb/NDAwMC8xMDA4MA==/tmp-storage"

# Specifies the maximum use of temporary storage (bytes) for all active queries when `oom-use-tmp-storage` is enabled.
# If the `temp-storage-quota` exceeds the capacity of the temporary storage directory, tidb-server would return an error and exit.
# The default value of temp-storage-quota is under 0 which means tidb-server wouldn't check the capacity.
temp-storage-quota = -1
# If the `tmp-storage-quota` exceeds the capacity of the temporary storage directory, tidb-server would return an error and exit.
# The default value of tmp-storage-quota is under 0 which means tidb-server wouldn't check the capacity.
tmp-storage-quota = -1

# Specifies what operation TiDB performs when a single SQL statement exceeds the memory quota specified by mem-quota-query and cannot be spilled over to disk.
# Valid options: ["log", "cancel"]
Expand Down
2 changes: 1 addition & 1 deletion tidb-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func checkTempStorageQuota() {
if err != nil {
log.Fatal(err.Error())
} else if capacityByte < uint64(c.TempStorageQuota) {
log.Fatal(fmt.Sprintf("value of [temp-storage-quota](%d byte) exceeds the capacity(%d byte) of the [%s] directory", c.TempStorageQuota, capacityByte, c.TempStoragePath))
log.Fatal(fmt.Sprintf("value of [tmp-storage-quota](%d byte) exceeds the capacity(%d byte) of the [%s] directory", c.TempStorageQuota, capacityByte, c.TempStoragePath))
}
}
}
Expand Down

0 comments on commit b2f5921

Please sign in to comment.