Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/pingcap/tidb into test-ti…
Browse files Browse the repository at this point in the history
…flash-fix
  • Loading branch information
YuJuncen committed Aug 18, 2022
2 parents f2e2010 + 900870b commit ea3175a
Show file tree
Hide file tree
Showing 21 changed files with 413 additions and 101 deletions.
5 changes: 4 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ build --java_language_version=17
build --java_runtime_version=17
build --tool_java_language_version=17
build --tool_java_runtime_version=17
build:ci --color=yes
run:ci --color=yes

run --color=yes
build:release --workspace_status_command=./build/print-workspace-status.sh --stamp
build:release --config=ci
build --incompatible_strict_action_env --incompatible_enable_cc_toolchain_resolution
build:ci --experimental_remote_cache_compression
test:ci --color=yes
test:ci --verbose_failures
test:ci --test_env=GO_TEST_WRAP_TESTV=1 --test_verbose_timeout_warnings
test:ci --test_env=TZ=Asia/Shanghai --test_output=errors --experimental_ui_max_stdouterr_bytes=104857600

build:race --config=ci
build:race --@io_bazel_rules_go//go/config:race --test_env=GORACE=halt_on_error=1 --test_sharding_strategy=disabled
test:race --test_timeout=1200,6000,18000,72000

Expand Down
14 changes: 0 additions & 14 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,3 @@ xcode_version(
name = "xcode_version",
version = "10.0",
)

filegroup(
name = "package-srcs",
srcs = glob(
["**"],
exclude = [
"bazel-*/**",
".git/**",
".idea/**",
],
),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ bazel_ci_prepare:

bazel_prepare:
bazel run //:gazelle
bazel run //:gazelle -- update-repos -from_file=go.mod -build_file_proto_mode=disable
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro DEPS.bzl%go_deps -build_file_proto_mode=disable

bazel_test: failpoint-enable bazel_ci_prepare
bazel $(BAZEL_GLOBAL_CONFIG) test $(BAZEL_CMD_CONFIG) \
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/task/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ func ParseTSString(ts string, tzCheck bool) (uint64, error) {
if tzCheck {
tzIdx, _, _, _, _ := types.GetTimezone(ts)
if tzIdx < 0 {
return 0, errors.Errorf("must set timezone when using datetime format ts")
return 0, errors.Errorf("must set timezone when using datetime format ts, e.g. '2018-05-11 01:42:23+0800'")
}
}
t, err := types.ParseTime(sc, ts, mysql.TypeTimestamp, types.MaxFsp)
Expand Down
5 changes: 0 additions & 5 deletions br/web/go.mod

This file was deleted.

1 change: 0 additions & 1 deletion br/web/go.sum

This file was deleted.

20 changes: 11 additions & 9 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ type Config struct {
Path string `toml:"path" json:"path"`
Socket string `toml:"socket" json:"socket"`
Lease string `toml:"lease" json:"lease"`
RunDDL bool `toml:"run-ddl" json:"run-ddl"`
SplitTable bool `toml:"split-table" json:"split-table"`
TokenLimit uint `toml:"token-limit" json:"token-limit"`
TempDir string `toml:"temp-dir" json:"temp-dir"`
Expand Down Expand Up @@ -215,8 +214,6 @@ type Config struct {
RepairTableList []string `toml:"repair-table-list" json:"repair-table-list"`
// IsolationRead indicates that the TiDB reads data from which isolation level(engine and label).
IsolationRead IsolationRead `toml:"isolation-read" json:"isolation-read"`
// MaxServerConnections is the maximum permitted number of simultaneous client connections.
MaxServerConnections uint32 `toml:"max-server-connections" json:"max-server-connections"`
// NewCollationsEnabledOnFirstBootstrap indicates if the new collations are enabled, it effects only when a TiDB cluster bootstrapped on the first time.
NewCollationsEnabledOnFirstBootstrap bool `toml:"new_collations_enabled_on_first_bootstrap" json:"new_collations_enabled_on_first_bootstrap"`
// Experimental contains parameters for experimental features.
Expand Down Expand Up @@ -274,10 +271,12 @@ type Config struct {
// OOMUseTmpStorage unused since bootstrap v93
OOMUseTmpStorage bool `toml:"oom-use-tmp-storage" json:"oom-use-tmp-storage"`

// CheckMb4ValueInUTF8, EnableCollectExecutionInfo, Plugin are deprecated.
// These items are deprecated because they are turned into instance system variables.
CheckMb4ValueInUTF8 AtomicBool `toml:"check-mb4-value-in-utf8" json:"check-mb4-value-in-utf8"`
EnableCollectExecutionInfo bool `toml:"enable-collect-execution-info" json:"enable-collect-execution-info"`
Plugin Plugin `toml:"plugin" json:"plugin"`
MaxServerConnections uint32 `toml:"max-server-connections" json:"max-server-connections"`
RunDDL bool `toml:"run-ddl" json:"run-ddl"`
}

// UpdateTempStoragePath is to update the `TempStoragePath` if port/statusPort was changed
Expand Down Expand Up @@ -486,11 +485,12 @@ type Instance struct {
ForcePriority string `toml:"tidb_force_priority" json:"tidb_force_priority"`
MemoryUsageAlarmRatio float64 `toml:"tidb_memory_usage_alarm_ratio" json:"tidb_memory_usage_alarm_ratio"`
// EnableCollectExecutionInfo enables the TiDB to collect execution info.
EnableCollectExecutionInfo bool `toml:"tidb_enable_collect_execution_info" json:"tidb_enable_collect_execution_info"`
PluginDir string `toml:"plugin_dir" json:"plugin_dir"`
PluginLoad string `toml:"plugin_load" json:"plugin_load"`
MaxConnections uint32 `toml:"max_connections" json:"max_connections"`
TiDBEnableDDL AtomicBool `toml:"tidb_enable_ddl" json:"tidb_enable_ddl"`
EnableCollectExecutionInfo bool `toml:"tidb_enable_collect_execution_info" json:"tidb_enable_collect_execution_info"`
PluginDir string `toml:"plugin_dir" json:"plugin_dir"`
PluginLoad string `toml:"plugin_load" json:"plugin_load"`
// MaxConnections is the maximum permitted number of simultaneous client connections.
MaxConnections uint32 `toml:"max_connections" json:"max_connections"`
TiDBEnableDDL AtomicBool `toml:"tidb_enable_ddl" json:"tidb_enable_ddl"`
}

func (l *Log) getDisableTimestamp() bool {
Expand Down Expand Up @@ -1036,6 +1036,8 @@ var removedConfig = map[string]struct{}{
"performance.feedback-probability": {}, // This feature is deprecated
"performance.query-feedback-limit": {},
"oom-use-tmp-storage": {}, // use tidb_enable_tmp_storage_on_oom
"max-server-connections": {}, // use sysvar max_connections
"run-ddl": {}, // use sysvar tidb_enable_ddl
}

// isAllRemovedConfigItems returns true if all the items that couldn't validate
Expand Down
2 changes: 1 addition & 1 deletion distsql/distsql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func TestAnalyze(t *testing.T) {
sctx := newMockSessionContext()
sctx.GetSessionVars().EnableChunkRPC = false
request, err := (&RequestBuilder{}).SetKeyRanges(nil).
SetAnalyzeRequest(&tipb.AnalyzeReq{}).
SetAnalyzeRequest(&tipb.AnalyzeReq{}, kv.RC).
SetKeepOrder(true).
Build()
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions distsql/request_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ func (builder *RequestBuilder) SetDAGRequest(dag *tipb.DAGRequest) *RequestBuild
}

// SetAnalyzeRequest sets the request type to "ReqTypeAnalyze" and construct request data.
func (builder *RequestBuilder) SetAnalyzeRequest(ana *tipb.AnalyzeReq) *RequestBuilder {
func (builder *RequestBuilder) SetAnalyzeRequest(ana *tipb.AnalyzeReq, isoLevel kv.IsoLevel) *RequestBuilder {
if builder.err == nil {
builder.Request.Tp = kv.ReqTypeAnalyze
builder.Request.Data, builder.err = ana.Marshal()
builder.Request.NotFillCache = true
builder.Request.IsolationLevel = kv.SI
builder.Request.IsolationLevel = isoLevel
builder.Request.Priority = kv.PriorityLow
}

Expand Down
4 changes: 2 additions & 2 deletions distsql/request_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ func TestRequestBuilder5(t *testing.T) {
}

actual, err := (&RequestBuilder{}).SetKeyRanges(keyRanges).
SetAnalyzeRequest(&tipb.AnalyzeReq{}).
SetAnalyzeRequest(&tipb.AnalyzeReq{}, kv.RC).
SetKeepOrder(true).
SetConcurrency(15).
Build()
Expand All @@ -494,7 +494,7 @@ func TestRequestBuilder5(t *testing.T) {
KeepOrder: true,
Desc: false,
Concurrency: 15,
IsolationLevel: kv.SI,
IsolationLevel: kv.RC,
Priority: 1,
NotFillCache: true,
ReadReplicaScope: kv.GlobalReplicaScope,
Expand Down
Loading

0 comments on commit ea3175a

Please sign in to comment.