-
Notifications
You must be signed in to change notification settings - Fork 188
worker, utils: show same master status in one response #817
worker, utils: show same master status in one response #817
Conversation
pkg/utils/db.go
Outdated
defer masterMu.Unlock() | ||
|
||
if useMasterStatusCache && masterStatusCached { | ||
return masterPosCache, masterGTIDCache, nil |
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.
Will this cause global point
greater than master point
?
Yes. What's a better way? use larger master position and re-check two units?
GMHDBJD <notifications@github.com> 于 2020年7月23日周四 15:20写道:
… ***@***.**** commented on this pull request.
------------------------------
In pkg/utils/db.go
<#817 (comment)>:
> // GetMasterStatus gets status from master
func GetMasterStatus(db *sql.DB, flavor string) (gmysql.Position, gtid.Set, error) {
+ masterMu.Lock()
+ defer masterMu.Unlock()
+
+ if useMasterStatusCache && masterStatusCached {
+ return masterPosCache, masterGTIDCache, nil
Will this cause global point greater
<https://github.com/pingcap/dm/blob/7ec79aed1816481099f01fcf0aaf48c7b783c96a/syncer/status.go#L79>
than master point?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#817 (review)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4RJWRVGSUKA6MSWIA45TR47QETANCNFSM4PFJ7FCA>
.
|
How about use the last one master position for same worker? |
last is larger position or something? not very understand
GMHDBJD <notifications@github.com> 于 2020年7月23日周四 17:29写道:
… Yes. What's a better way? use larger master position and re-check two
units?
How about use the last master position?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#817 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4RJVAUPEHIGEQ5FLLSQTR477JBANCNFSM4PFJ7FCA>
.
|
Yes,use the largest one |
Codecov Report
@@ Coverage Diff @@
## release-1.0 #817 +/- ##
===================================================
- Coverage 57.7345% 57.7072% -0.0274%
===================================================
Files 168 168
Lines 16756 16757 +1
===================================================
- Hits 9674 9670 -4
- Misses 6200 6204 +4
- Partials 882 883 +1 |
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.
rest 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
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.
rest LGTM.
Should we need to re-implement this in master branch?
fix typo fix wrong behaviour
d3eef4f
to
2b09abe
Compare
yes, in description of this PR I added cherry-pick to master😂, will add a "wrong" tag to remind myself |
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
What problem does this PR solve?
fix #727
What is changed and how it works?
when one response contains multiple relay and syncer status, use the larger master binlog position overwrite them and re-check status.
Check List
Tests
Code changes
Side effects
Related changes