-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed up gtid process for mysql #738
Conversation
GMHDBJD
commented
Nov 17, 2022
- add InsertInterval for mysql gtidset
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
mysql/mysql_gtid.go
Outdated
} | ||
i++ | ||
if count > 0 { | ||
for i != total { |
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.
seems we can use a copy
to move multiple elements with count
offset, and truncate the last count
elements
if count > 0 {
i++
copy((*s)[i:], (*s)[i+count:])
*s = (*s)[:total-count]
}
mysql/mysql_gtid.go
Outdated
@@ -439,6 +484,17 @@ func (s *MysqlGTIDSet) Update(GTIDStr string) error { | |||
return nil | |||
} | |||
|
|||
func (s *MysqlGTIDSet) AddGTID(uuid uuid.UUID, gno int64) error { |
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.
remove returned error?