Skip to content

Commit

Permalink
dm/syncer : fix unstable test in shardddl1 (pingcap#3471)
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardXiao authored and glorv committed Nov 17, 2021
1 parent d55eb26 commit 0d4e976
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dm/dm/master/shardddl/optimist.go
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ func (o *Optimist) handleLock(info optimism.Info, tts []optimism.TargetTable, sk
func (o *Optimist) removeLock(lock *optimism.Lock) (bool, error) {
failpoint.Inject("SleepWhenRemoveLock", func(val failpoint.Value) {
t := val.(int)
log.L().Info("wait new ddl info putted into etcd",
log.L().Info("wait new ddl info putted into etcd in optimistic",
zap.String("failpoint", "SleepWhenRemoveLock"),
zap.Int("max wait second", t))

Expand Down
2 changes: 1 addition & 1 deletion dm/dm/master/shardddl/pessimist.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ func (p *Pessimist) removeLock(lock *pessimism.Lock) error {

failpoint.Inject("SleepWhenRemoveLock", func(val failpoint.Value) {
t := val.(int)
log.L().Info("wait new ddl info putted into etcd",
log.L().Info("wait new ddl info putted into etcd in pessimistic",
zap.String("failpoint", "SleepWhenRemoveLock"),
zap.Int("max wait second", t))

Expand Down
2 changes: 1 addition & 1 deletion dm/tests/shardddl1/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ function DM_RemoveLock_CASE() {
run_sql_source1 "alter table ${shardddl1}.${tb1} add column c double;"
run_sql_source2 "alter table ${shardddl1}.${tb1} add column c double;"
run_sql_source2 "alter table ${shardddl1}.${tb2} add column c double;"
check_log_contain_with_retry "wait new ddl info putted into etcd" $WORK_DIR/master/log/dm-master.log
check_log_contain_with_retry "wait new ddl info putted into etcd in ${1}" $WORK_DIR/master/log/dm-master.log
check_metric_not_contains $MASTER_PORT "dm_master_shard_ddl_error" 3
run_sql_source1 "alter table ${shardddl1}.${tb1} drop column b;"

Expand Down

0 comments on commit 0d4e976

Please sign in to comment.