From 557a5ae41730b4e9e9fd131827ff8448a1916daa Mon Sep 17 00:00:00 2001 From: Kolbe Kegel Date: Wed, 5 Aug 2020 15:19:38 -0700 Subject: [PATCH 1/2] Add support for max-index-length to TidbCluster CRD --- manifests/crd.yaml | 6 ++++++ pkg/apis/pingcap/v1alpha1/tidb_config.go | 3 +++ 2 files changed, 9 insertions(+) diff --git a/manifests/crd.yaml b/manifests/crd.yaml index 66dc621b7e..bedf38aa0e 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -6548,6 +6548,9 @@ spec: max-server-connections: format: int64 type: integer + max-index-length: + format: int64 + type: integer mem-quota-query: format: int64 type: integer @@ -15038,6 +15041,9 @@ spec: max-server-connections: format: int64 type: integer + max-index-length: + format: int64 + type: integer mem-quota-query: format: int64 type: integer diff --git a/pkg/apis/pingcap/v1alpha1/tidb_config.go b/pkg/apis/pingcap/v1alpha1/tidb_config.go index b97c3acb65..af30ec46a2 100644 --- a/pkg/apis/pingcap/v1alpha1/tidb_config.go +++ b/pkg/apis/pingcap/v1alpha1/tidb_config.go @@ -57,6 +57,9 @@ type TiDBConfig struct { // Optional: Defaults to log // +optional OOMAction *string `toml:"oom-action,omitempty" json:"oom-action,omitempty"` + // Optional: Defaults to 3072 + // +optional + MaxIndexLength *int64 `toml:"max-index-length,omitempty" json:"max-index-length,omitempty"` // Optional: Defaults to 34359738368 // +optional MemQuotaQuery *int64 `toml:"mem-quota-query,omitempty" json:"mem-quota-query,omitempty"` From e9e1452e37486ffa27cc34eb6ff78ba3969d02c2 Mon Sep 17 00:00:00 2001 From: Kolbe Kegel Date: Thu, 6 Aug 2020 08:56:53 -0700 Subject: [PATCH 2/2] Ran hack/update-all.sh --- docs/api-references/docs.md | 12 ++++++++++++ manifests/crd.yaml | 8 ++++---- pkg/apis/pingcap/v1alpha1/openapi_generated.go | 7 +++++++ pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go | 5 +++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/docs/api-references/docs.md b/docs/api-references/docs.md index 6686e50bd2..80c1165b36 100644 --- a/docs/api-references/docs.md +++ b/docs/api-references/docs.md @@ -9680,6 +9680,18 @@ string +max-index-length
+ +int64 + + + +(Optional) +

Optional: Defaults to 3072

+ + + + mem-quota-query
int64 diff --git a/manifests/crd.yaml b/manifests/crd.yaml index bedf38aa0e..f5584011c3 100644 --- a/manifests/crd.yaml +++ b/manifests/crd.yaml @@ -6545,10 +6545,10 @@ spec: lower-case-table-names: format: int32 type: integer - max-server-connections: + max-index-length: format: int64 type: integer - max-index-length: + max-server-connections: format: int64 type: integer mem-quota-query: @@ -15038,10 +15038,10 @@ spec: lower-case-table-names: format: int32 type: integer - max-server-connections: + max-index-length: format: int64 type: integer - max-index-length: + max-server-connections: format: int64 type: integer mem-quota-query: diff --git a/pkg/apis/pingcap/v1alpha1/openapi_generated.go b/pkg/apis/pingcap/v1alpha1/openapi_generated.go index e0d3f69871..e7f641f399 100644 --- a/pkg/apis/pingcap/v1alpha1/openapi_generated.go +++ b/pkg/apis/pingcap/v1alpha1/openapi_generated.go @@ -4821,6 +4821,13 @@ func schema_pkg_apis_pingcap_v1alpha1_TiDBConfig(ref common.ReferenceCallback) c Format: "", }, }, + "max-index-length": { + SchemaProps: spec.SchemaProps{ + Description: "Optional: Defaults to 3072", + Type: []string{"integer"}, + Format: "int64", + }, + }, "mem-quota-query": { SchemaProps: spec.SchemaProps{ Description: "Optional: Defaults to 34359738368", diff --git a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go index 76dd3ac51e..d269387593 100644 --- a/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/pingcap/v1alpha1/zz_generated.deepcopy.go @@ -3988,6 +3988,11 @@ func (in *TiDBConfig) DeepCopyInto(out *TiDBConfig) { *out = new(string) **out = **in } + if in.MaxIndexLength != nil { + in, out := &in.MaxIndexLength, &out.MaxIndexLength + *out = new(int64) + **out = **in + } if in.MemQuotaQuery != nil { in, out := &in.MemQuotaQuery, &out.MemQuotaQuery *out = new(int64)