-
Notifications
You must be signed in to change notification settings - Fork 2.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
Implemented pitr testcase #6594
Conversation
…gle shard. It also tests pitr for multiple shards when a single shard is resharded. Signed-off-by: Pankaj Gavit <pankaj.gavit777@gmail.com>
@@ -38,7 +38,7 @@ type mysqlMaster struct { | |||
|
|||
// newBinlogServer returns an instance of binlog server | |||
func newBinlogServer(hostname string, port int) (*binLogServer, error) { | |||
dataDir := path.Join(os.Getenv("VTDATAROOT"), binlogDataDir) | |||
dataDir := path.Join(os.Getenv("VTDATAROOT"), binlogDataDir+"_"+fmt.Sprintf("%d", port)) |
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.
nit: if we are doing fmt.Sprintf, can't the whole string be created this way instead of mixing concatenation and sprintf?
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.
Used fmt.Sprintf() func to create a string
@@ -0,0 +1,523 @@ | |||
package pitr |
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.
Missing license header
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.
Added license header
Signed-off-by: Pankaj Gavit <pankaj.gavit777@gmail.com>
Signed-off-by: Pankaj Gavit <pankaj.gavit777@gmail.com>
@@ -0,0 +1,539 @@ | |||
/* |
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.
Because you renamed the file, I can't tell what changed. Can you rename this to pitr_test.go?
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.
The codeflow of current testcase is totally different from the previous testcase. As there will be a lot of diff between the previous testcase and current testcase, I kept a different filename.
If required, I will change the filename back to pitr_test.go
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.
Nice work!
One minor nit: typo.
Co-authored-by: Deepthi Sigireddi <deepthi.sigireddi@gmail.com> Signed-off-by: Pankaj Gavit <pankaj.gavit777@gmail.com>
21fcd2e
to
6baadd2
Compare
pitr_test.go
and incorporated them in theTestPITRRecovery
testFixes :
restore.go
ingetGTIDFromTimestamp
where it fails to recover when we have one last event after therestoreTime/snapshotTime
.Signed-off-by: Pankaj Gavit <pankaj.gavit777@gmail.com>