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

lightning: check peers write stall when switch-mode is disabled #40228

Merged
merged 11 commits into from
Dec 30, 2022
Prev Previous commit
Next Next commit
fix CI
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Dec 29, 2022
commit bc4dec4cd3c65ca97b71d492557aece326c5af65
2 changes: 2 additions & 0 deletions br/pkg/lightning/backend/local/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ go_test(
"//br/pkg/lightning/glue",
"//br/pkg/lightning/log",
"//br/pkg/lightning/mydump",
"//br/pkg/lightning/worker",
"//br/pkg/membuf",
"//br/pkg/mock",
"//br/pkg/pdutil",
Expand Down Expand Up @@ -139,6 +140,7 @@ go_test(
"@com_github_tikv_pd_client//:client",
"@org_golang_google_grpc//:grpc",
"@org_golang_google_grpc//codes",
"@org_golang_google_grpc//metadata",
"@org_golang_google_grpc//status",
"@org_uber_go_atomic//:atomic",
],
Expand Down
4 changes: 2 additions & 2 deletions br/pkg/lightning/backend/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ func (f *mockImportClientFactory) Create(_ context.Context, storeID uint64) (sst
return f.createClientFn(store), nil
}
}
return nil, errors.New(fmt.Sprintf("store %d not found", storeID))
return nil, fmt.Errorf("store %d not found", storeID)
}

func (f *mockImportClientFactory) Close() {}
Expand Down Expand Up @@ -1274,7 +1274,7 @@ func TestLocalIsRetryableTiKVWriteError(t *testing.T) {
require.True(t, l.isRetryableImportTiKVError(errors.Trace(io.EOF)))
}

func TestServerIsBusy(t *testing.T) {
func TestCheckPeersBusy(t *testing.T) {
ctx := context.Background()
pdCli := &mockPdClient{}
pdCtl := &pdutil.PdController{}
Expand Down