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

ddl: return panic when to get tiflash sync progress failed in test #41292

Merged
merged 5 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 8 additions & 0 deletions ddl/ddl_tiflash_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (
"github.com/pingcap/tidb/store/helper"
"github.com/pingcap/tidb/table"
"github.com/pingcap/tidb/util"
"github.com/pingcap/tidb/util/intest"
"github.com/pingcap/tidb/util/logutil"
atomicutil "go.uber.org/atomic"
"go.uber.org/zap"
Expand Down Expand Up @@ -398,6 +399,13 @@ func pollAvailableTableProgress(schemas infoschema.InfoSchema, ctx sessionctx.Co
zap.Int64("tableID", availableTableID.ID),
zap.Bool("IsPartition", availableTableID.IsPartition),
)
if intest.InTest {
// In the test, the server cannot start up because the port is occupied.
// Although the port is random. so we need to quickly return when to
// fail to get tiflash sync.
// https://github.com/pingcap/tidb/issues/39949
panic(err)
}
continue
}
err = infosync.UpdateTiFlashProgressCache(availableTableID.ID, progress)
Expand Down
2 changes: 2 additions & 0 deletions ddl/tiflashtest/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")

go_test(
name = "tiflashtest_test",
timeout = "short",
srcs = [
"ddl_tiflash_test.go",
"main_test.go",
],
flaky = True,
shard_count = 30,
deps = [
"//config",
"//ddl",
Expand Down