Conversation
- Added flags for restore to time - Added flags for binlog server details Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
- added ability to fetch the GTID from the restore time - added ability to apply the binlogs till the above GTID Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
…chan Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
1bffb9e to
dc8af79
Compare
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
fb065be to
a989cf2
Compare
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
| notifiers map[string]notifier | ||
|
|
||
| // SkipMetaCheck skips the metadata about the database and table information | ||
| SkipMetaCheck bool |
There was a problem hiding this comment.
@sougou , is it ok if we add this flag here? This flag will skip the sql query to get table information ( form information_schema). We need this when we need to get the GTID from timestamp , as the binlog server does not support the query and we also don't need that info in that process.
There was a problem hiding this comment.
Sounds good for now. I see that you're just using it to covert timestamp to gtid. There may be a simpler way to do that without having to use vstream, but we can use this method until we figure that out.
…le names Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
deepthi
left a comment
There was a problem hiding this comment.
Mostly comments and documentation, but there is an important logic issue as well.
| binlogPort = flag.Int("binlog_port", 0, "(PITR restore parameter) port of binlog server.") | ||
| binlogUser = flag.String("binlog_user", "", "(PITR restore parameter) username of binlog server.") | ||
| binlogPwd = flag.String("binlog_password", "", "(PITR restore parameter) password of binlog server.") | ||
| timeoutForGTIDLookup = flag.Duration("binlog_lookup_timeout", 60*time.Second, "(PITR restore parameter) timeout for fetching gtid from timestamp.") |
There was a problem hiding this comment.
what do you think of gtid_lookup_timeout for this flag name?
There was a problem hiding this comment.
that does not signifies which gtid we are referring to, let me know if we should use that.
There was a problem hiding this comment.
recovery_gtid_lookup_timeout?
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
I have implemented the suggestion you mentioned. |
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
go/mysql/flavor_mysql.go
Outdated
| // masterGTIDSet is part of the Flavor interface. | ||
| func (mysqlFlavor) masterGTIDSet(c *Conn) (GTIDSet, error) { | ||
| qr, err := c.ExecuteFetch("SELECT @@GLOBAL.gtid_executed", 1, false) | ||
| // making @@global as lowercase, as the PITR depends on binlog server, which honours only lowercase `global` value |
There was a problem hiding this comment.
Let's just make this:
// keep @@global as lowercase, as some servers like the Ripple binlog server only honors a lowercase `global` value
Otherwise people might get confused (since this is not PITR-specific code)
There was a problem hiding this comment.
Agreed, I have updated the comment.
|
Can you balance tests between docker_test_1 and docker_test_2? |
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
I have balanced the tests |
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
| if proc, err := tablet.MysqlctlProcess.StartProcess(); err != nil { | ||
| return err | ||
| } else { | ||
| // ignore golint warning, we need the else block to use proc |
There was a problem hiding this comment.
don't you need a //nolint here? otherwise CI will fail.
There was a problem hiding this comment.
not sure why golangci-lint did not capture this earlier, it is passing without //nolint, to be on safe side I have added it.
Signed-off-by: Arindam Nayak <arindam.nayak@outlook.com>
Implemented the suggested changes and also updated the flag name. |
|
Very nice work! This has been a long-standing request. |
Implemented PITR-2
Fixes #6267, fixes #4886
Here are the changes I did.