fix: clamp dashboard cdc position gap
This commit is contained in:
parent
db491b92e5
commit
05b35159b2
@ -138,9 +138,12 @@ func positionMap(pos mysql.Position) map[string]interface{} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func positionGap(master mysql.Position, checkpoint mysql.Position) interface{} {
|
func positionGap(master mysql.Position, checkpoint mysql.Position) interface{} {
|
||||||
if master.Name == "" || checkpoint.Name == "" || master.Name != checkpoint.Name || master.Pos < checkpoint.Pos {
|
if master.Name == "" || checkpoint.Name == "" || master.Name != checkpoint.Name {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
if master.Pos < checkpoint.Pos {
|
||||||
|
return uint32(0)
|
||||||
|
}
|
||||||
return master.Pos - checkpoint.Pos
|
return master.Pos - checkpoint.Pos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user