Skip to content
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

Update PD Config to v3.1.0 #1928

Merged
merged 12 commits into from
Mar 23, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 113 additions & 3 deletions docs/api-references/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -3876,6 +3876,17 @@ <h3 id="pingcap.com/v1alpha1.PDConfig">PDConfig
Optional: Defaults to true</p>
</td>
</tr>
<tr>
<td>
<code>enable-dynamic-config</code></br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
</td>
</tr>
</tbody>
</table>
<h3 id="pingcap.com/v1alpha1.PDFailureMember">PDFailureMember
Expand Down Expand Up @@ -4078,6 +4089,21 @@ <h3 id="pingcap.com/v1alpha1.PDLogConfig">PDLogConfig
message.</p>
</td>
</tr>
<tr>
<td>
<code>sampling</code></br>
<em>
go.uber.org/zap.SamplingConfig
</em>
</td>
<td>
<em>(Optional)</em>
<p>SamplingConfig sets a sampling strategy for the logger. Sampling caps the
global CPU and I/O load that logging puts on your process while attempting
to preserve a representative subset of your logs.</p>
<p>Values configured here are per-second. See zapcore.NewSampler for details.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="pingcap.com/v1alpha1.PDMember">PDMember
Expand Down Expand Up @@ -4355,7 +4381,20 @@ <h3 id="pingcap.com/v1alpha1.PDReplicationConfig">PDReplicationConfig
<td>
<em>(Optional)</em>
<p>StrictlyMatchLabel strictly checks if the label of TiKV is matched with LocaltionLabels.
Immutable, change should be made through pd-ctl after cluster creation</p>
Immutable, change should be made through pd-ctl after cluster creation
imported from v3.1.0</p>
</td>
</tr>
<tr>
<td>
<code>enable-placement-rules,string</code></br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>When PlacementRules feature is enabled. MaxReplicas and LocationLabels are not uesd any more.</p>
</td>
</tr>
</tbody>
Expand Down Expand Up @@ -4487,7 +4526,8 @@ <h3 id="pingcap.com/v1alpha1.PDScheduleConfig">PDScheduleConfig
<em>(Optional)</em>
<p>LeaderScheduleLimit is the max coexist leader schedules.
Immutable, change should be made through pd-ctl after cluster creation
Optional: Defaults to 4</p>
Optional: Defaults to 4
imported from v3.1.0</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -4571,7 +4611,8 @@ <h3 id="pingcap.com/v1alpha1.PDScheduleConfig">PDScheduleConfig
<td>
<em>(Optional)</em>
<p>TolerantSizeRatio is the ratio of buffer size for balance scheduler.
Immutable, change should be made through pd-ctl after cluster creation</p>
Immutable, change should be made through pd-ctl after cluster creation
imported from v3.1.0</p>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -4731,6 +4772,50 @@ <h3 id="pingcap.com/v1alpha1.PDScheduleConfig">PDScheduleConfig
<p>Only used to display</p>
</td>
</tr>
<tr>
<td>
<code>store-limit-mode</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>StoreLimitMode can be auto or manual, when set to auto,
PD tries to change the store limit values according to
the load state of the cluster dynamically. User can
overwrite the auto-tuned value by pd-ctl, when the value
is overwritten, the value is fixed until it is deleted.
Default: manual</p>
</td>
</tr>
<tr>
<td>
<code>enable-one-way-merge,string</code></br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>EnableOneWayMerge is the option to enable one way merge. This means a Region can only be merged into the next region of it.
imported from v3.1.0</p>
</td>
</tr>
<tr>
<td>
<code>enable-cross-table-merge,string</code></br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
<p>EnableCrossTableMerge is the option to enable cross table merge. This means two Regions can be merged with different table IDs.
This option only works when key type is &ldquo;table&rdquo;.
imported from v3.1.0</p>
</td>
</tr>
</tbody>
</table>
<h3 id="pingcap.com/v1alpha1.PDSchedulerConfig">PDSchedulerConfig
Expand Down Expand Up @@ -4845,6 +4930,17 @@ <h3 id="pingcap.com/v1alpha1.PDSecurityConfig">PDSecurityConfig
<p>KeyPath is the path of file that contains X509 key in PEM format.</p>
</td>
</tr>
<tr>
<td>
<code>client-cert-auth</code></br>
<em>
bool
</em>
</td>
<td>
<em>(Optional)</em>
</td>
</tr>
</tbody>
</table>
<h3 id="pingcap.com/v1alpha1.PDServerConfig">PDServerConfig
Expand Down Expand Up @@ -4876,6 +4972,20 @@ <h3 id="pingcap.com/v1alpha1.PDServerConfig">PDServerConfig
<p>UseRegionStorage enables the independent region storage.</p>
</td>
</tr>
<tr>
<td>
<code>metric-storage</code></br>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>MetricStorage is the cluster metric storage.
Currently we use prometheus as metric storage, we may use PD/TiKV as metric storage later.
imported from v3.1.0</p>
</td>
</tr>
</tbody>
</table>
<h3 id="pingcap.com/v1alpha1.PDSpec">PDSpec
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ require (
github.com/ugorji/go/codec v0.0.0-20190204201341-e444a5086c43
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
go.uber.org/zap v1.9.1
gocloud.dev v0.18.0
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
gomodules.xyz/jsonpatch/v2 v2.0.1
Expand Down
41 changes: 38 additions & 3 deletions manifests/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,8 @@ spec:
description: ElectionInterval is the interval for etcd Raft
election.
type: string
enable-dynamic-config:
type: boolean
enable-grpc-gateway:
description: 'Optional: Defaults to true'
type: boolean
Expand Down Expand Up @@ -1419,6 +1421,7 @@ spec:
level:
description: 'Log level. Optional: Defaults to info'
type: string
sampling: {}
type: object
log-file:
description: Backward compatibility.
Expand All @@ -1443,6 +1446,11 @@ spec:
pd-server:
description: PDServerConfig is the configuration for pd server.
properties:
metric-storage:
description: MetricStorage is the cluster metric storage.
Currently we use prometheus as metric storage, we may
use PD/TiKV as metric storage later. imported from v3.1.0
Copy link
Contributor

@cofyc cofyc Mar 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can use Available since TiDB v3.1.0 to tell the user that this config is available since TiDB v3.1.0?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edit: I added TiDB prefix because we should make it clear that v3.1.0 is the version of TiDB not tidb-operator, etc.

type: string
use-region-storage:
description: UseRegionStorage enables the independent region
storage.
Expand All @@ -1456,6 +1464,10 @@ spec:
replication:
description: PDReplicationConfig is the replication configuration.
properties:
enable-placement-rules:
description: When PlacementRules feature is enabled. MaxReplicas
and LocationLabels are not uesd any more.
type: string
max-replicas:
description: 'MaxReplicas is the number of replicas for
each region. Immutable, change should be made through
Expand All @@ -1465,7 +1477,8 @@ spec:
strictly-match-label:
description: StrictlyMatchLabel strictly checks if the label
of TiKV is matched with LocaltionLabels. Immutable, change
should be made through pd-ctl after cluster creation
should be made through pd-ctl after cluster creation imported
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a period at the end of the previous sentence. We should make the description readable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

from v3.1.0
type: string
type: object
schedule:
Expand Down Expand Up @@ -1511,6 +1524,17 @@ spec:
Immutable, change should be made through pd-ctl after
cluster creation
type: string
enable-cross-table-merge:
description: EnableCrossTableMerge is the option to enable
cross table merge. This means two Regions can be merged
with different table IDs. This option only works when
key type is "table". imported from v3.1.0
type: string
enable-one-way-merge:
description: EnableOneWayMerge is the option to enable one
way merge. This means a Region can only be merged into
the next region of it. imported from v3.1.0
type: string
high-space-ratio:
description: HighSpaceRatio is the highest usage ratio of
store which regraded as high space. High space means there
Expand All @@ -1537,7 +1561,8 @@ spec:
leader-schedule-limit:
description: 'LeaderScheduleLimit is the max coexist leader
schedules. Immutable, change should be made through pd-ctl
after cluster creation Optional: Defaults to 4'
after cluster creation Optional: Defaults to 4 imported
from v3.1.0'
format: int64
type: integer
low-space-ratio:
Expand Down Expand Up @@ -1640,10 +1665,18 @@ spec:
be made through pd-ctl after cluster creation Optional:
Defaults to 1h'
type: string
store-limit-mode:
description: 'StoreLimitMode can be auto or manual, when
set to auto, PD tries to change the store limit values
according to the load state of the cluster dynamically.
User can overwrite the auto-tuned value by pd-ctl, when
the value is overwritten, the value is fixed until it
is deleted. Default: manual'
type: string
tolerant-size-ratio:
description: TolerantSizeRatio is the ratio of buffer size
for balance scheduler. Immutable, change should be made
through pd-ctl after cluster creation
through pd-ctl after cluster creation imported from v3.1.0
format: double
type: number
type: object
Expand All @@ -1660,6 +1693,8 @@ spec:
description: CertPath is the path of file that contains
X509 certificate in PEM format.
type: string
client-cert-auth:
type: boolean
key-path:
description: KeyPath is the path of file that contains X509
key in PEM format.
Expand Down
Loading