This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 188
relay: retry for upstream bad connection #265
Merged
Merged
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e856e28
relay: only update GTID for DDL query (and XID)
csuzhangxc a176f37
GO111MODULE=on go get -u github.com/siddontang/go-mysql@f52d30c9fcb78…
csuzhangxc 5cd63b4
relay: add a backoff retry mechanism
csuzhangxc 73a038d
*: relay retry for upstream bad connection
csuzhangxc e12cb98
*: fix CI
csuzhangxc 31c7bbf
*: fix CI
csuzhangxc 5afa82f
relay: add test case for relay retry
csuzhangxc be219a2
relay: fix CI
csuzhangxc fc7149b
relay: try fix CI
csuzhangxc 6f8de21
relay: address comment
csuzhangxc 8c7cc99
Merge branch 'master' into relay-retry
IANTHEREAL f0282f5
Merge branch 'master' into relay-retry
csuzhangxc c6baaab
relay: address comment
csuzhangxc 37d6bc7
Merge remote-tracking branch 'origin/relay-retry' into relay-retry
csuzhangxc 73688c0
relay: address comments
csuzhangxc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ import ( | |
"github.com/pingcap/dm/pkg/terror" | ||
"github.com/pingcap/dm/relay" | ||
"github.com/pingcap/dm/relay/purger" | ||
rr "github.com/pingcap/dm/relay/retry" | ||
) | ||
|
||
// RelayHolder for relay unit | ||
|
@@ -96,6 +97,13 @@ func NewRealRelayHolder(cfg *Config) RelayHolder { | |
}, | ||
BinLogName: clone.RelayBinLogName, | ||
BinlogGTID: clone.RelayBinlogGTID, | ||
ReaderRetry: rr.ReaderRetryConfig{ // we use config for TaskChecker now | ||
BackoffRollback: cfg.Checker.BackoffRollback, | ||
BackoffMax: cfg.Checker.BackoffMax, | ||
BackoffMin: cfg.Checker.BackoffMin, | ||
BackoffJitter: cfg.Checker.BackoffJitter, | ||
BackoffFactor: cfg.Checker.BackoffFactor, | ||
}, | ||
} | ||
|
||
h := &realRelayHolder{ | ||
|
@@ -320,6 +328,13 @@ func (h *realRelayHolder) Update(ctx context.Context, cfg *Config) error { | |
User: cfg.From.User, | ||
Password: cfg.From.Password, | ||
}, | ||
ReaderRetry: rr.ReaderRetryConfig{ // we use config for TaskChecker now | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
BackoffRollback: cfg.Checker.BackoffRollback, | ||
BackoffMax: cfg.Checker.BackoffMax, | ||
BackoffMin: cfg.Checker.BackoffMin, | ||
BackoffJitter: cfg.Checker.BackoffJitter, | ||
BackoffFactor: cfg.Checker.BackoffFactor, | ||
}, | ||
} | ||
|
||
stage := h.Stage() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.