-
Notifications
You must be signed in to change notification settings - Fork 188
*: use dumpling's finish building connection location to leave safe mode #915
Conversation
/run-all-tests |
waiting dumpling to record exit binlog location in metadata files |
This comment has been minimized.
This comment has been minimized.
@@ -0,0 +1,181 @@ | |||
// Copyright 2019 PingCAP, Inc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renamed from pkg/utils/mydumper.go
to avoid importing cycle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should save exit location to checkpoint table, to handle worker switch before exit safe mode.
the case:
- start task with --consistency none and enter sync stage
- flush checkpoint for sync unit
- pause-task
- resume-task
Should save exit location to checkpoint table?
@@ -1094,7 +1094,7 @@ func (s *Syncer) Run(ctx context.Context) (err error) { | |||
if s.cfg.Mode == config.ModeAll { | |||
if err = s.flushCheckPoints(); err != nil { | |||
s.tctx.L().Warn("fail to flush checkpoints when starting task", zap.Error(err)) | |||
} else { | |||
} else if s.cfg.CleanDumpFile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this may fix the error in #941?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we default enabled CleanDumpFile
, so if this line was added #941 still happens. Maybe we should check downstream checkpoint, if not exist then load from file 😢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
previous if fresh
can achieve this?
Yes, going to change checkpoint structure, implement DM version update changes, and Maybe we should check downstream checkpoint, if not exist then load from file in new PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
cherry pick to release-2.0 failed |
What problem does this PR solve?
close #907
What is changed and how it works?
when dump unit can't assure consistency (for example migrate Aurora, or maybe we could support more scenario to avoid FTWRL), between start and ending of dumping's creating connections, binlog maybe duplicated with dump result, so we should enable safe mode in this period. originally safe mode was turned on for 5 minutes, this PR assure safe mode will keep for enough time.
maybe we should save exit location to checkpoint table, to handle worker switch before exit safe mode. This will achieve in another PR including updating strategy
Check List
Tests
Code changes
Side effects
Related changes