diff --git a/pkg/tso/allocator_manager.go b/pkg/tso/allocator_manager.go index a8bc69d5426..61b08599b5c 100644 --- a/pkg/tso/allocator_manager.go +++ b/pkg/tso/allocator_manager.go @@ -136,7 +136,6 @@ type AllocatorManager struct { // member is for election use member ElectionMember // TSO config - rootPath string storage endpoint.TSOStorage saveInterval time.Duration updatePhysicalInterval time.Duration diff --git a/pkg/utils/keypath/absolute_key_path.go b/pkg/utils/keypath/absolute_key_path.go index 5ca3f882996..a3e9fef13ea 100644 --- a/pkg/utils/keypath/absolute_key_path.go +++ b/pkg/utils/keypath/absolute_key_path.go @@ -169,6 +169,7 @@ func ExternalTimestampPath() string { return fmt.Sprintf(externalTimestampPathFormat, ClusterID()) } +// RecoveringMarkPath returns the path to save the recovering mark. func RecoveringMarkPath() string { return fmt.Sprintf(recoveringMarkPathFormat, ClusterID()) } diff --git a/tests/server/api/scheduler_test.go b/tests/server/api/scheduler_test.go index 22e84633045..3b41890012d 100644 --- a/tests/server/api/scheduler_test.go +++ b/tests/server/api/scheduler_test.go @@ -113,7 +113,7 @@ func (suite *scheduleTestSuite) checkOriginAPI(cluster *tests.TestCluster) { suite.assertSchedulerExists(urlPrefix, "evict-leader-scheduler") resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, "evict-leader-scheduler") + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, "evict-leader-scheduler") re.NoError(tu.ReadGetJSON(re, tests.TestDialClient, listURL, &resp)) re.Len(resp["store-id-ranges"], 1) input1 := make(map[string]any) @@ -186,7 +186,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { name: "balance-leader-scheduler", createdName: "balance-leader-scheduler", extraTestFunc: func(name string) { - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) resp := make(map[string]any) tu.Eventually(re, func() bool { re.NoError(tu.ReadGetJSON(re, tests.TestDialClient, listURL, &resp)) @@ -194,7 +194,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { }) dataMap := make(map[string]any) dataMap["batch"] = 3 - updateURL := fmt.Sprintf("%s%s%s/%s/config", leaderAddr, server.SchedulerConfigHandlerPath, name) + updateURL := fmt.Sprintf("%s%s/%s/config", leaderAddr, server.SchedulerConfigHandlerPath, name) body, err := json.Marshal(dataMap) re.NoError(err) re.NoError(tu.CheckPostJSON(tests.TestDialClient, updateURL, body, tu.StatusOK(re))) @@ -244,7 +244,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { createdName: "balance-hot-region-scheduler", extraTestFunc: func(name string) { resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) expectMap := map[string]any{ "min-hot-byte-rate": 100.0, "min-hot-key-rate": 10.0, @@ -318,7 +318,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { name: "split-bucket-scheduler", createdName: "split-bucket-scheduler", extraTestFunc: func(name string) { - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) resp := make(map[string]any) tu.Eventually(re, func() bool { re.NoError(tu.ReadGetJSON(re, tests.TestDialClient, listURL, &resp)) @@ -377,7 +377,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { createdName: "balance-witness-scheduler", extraTestFunc: func(name string) { resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) tu.Eventually(re, func() bool { re.NoError(tu.ReadGetJSON(re, tests.TestDialClient, listURL, &resp)) return resp["batch"] == 4.0 @@ -434,7 +434,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { args: []arg{{"store_id", 1}}, extraTestFunc: func(name string) { resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) expectedMap := make(map[string]any) expectedMap["1"] = []any{map[string]any{"end-key": "", "start-key": ""}} tu.Eventually(re, func() bool { @@ -478,14 +478,14 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { // Test the scheduler config handler. extraTestFunc: func(name string) { resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) tu.Eventually(re, func() bool { re.NoError(tu.ReadGetJSON(re, tests.TestDialClient, listURL, &resp)) return resp["start-key"] == "" && resp["end-key"] == "" && resp["range-name"] == "test" }) resp["start-key"] = "a_00" resp["end-key"] = "a_99" - updateURL := fmt.Sprintf("%s%s%s/%s/config", leaderAddr, server.SchedulerConfigHandlerPath, name) + updateURL := fmt.Sprintf("%s%s/%s/config", leaderAddr, server.SchedulerConfigHandlerPath, name) body, err := json.Marshal(resp) re.NoError(err) re.NoError(tu.CheckPostJSON(tests.TestDialClient, updateURL, body, tu.StatusOK(re))) @@ -503,7 +503,7 @@ func (suite *scheduleTestSuite) checkAPI(cluster *tests.TestCluster) { // Test the scheduler config handler. extraTestFunc: func(name string) { resp := make(map[string]any) - listURL := fmt.Sprintf("%s%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) + listURL := fmt.Sprintf("%s%s/%s/list", leaderAddr, server.SchedulerConfigHandlerPath, name) expectedMap := make(map[string]any) expectedMap["3"] = []any{map[string]any{"end-key": "", "start-key": ""}} tu.Eventually(re, func() bool {