Point in time recovery (part 1)#5160
Conversation
|
@enisoc from our code walkthrough, I have these notes:
All cases covered by integration tests have been tested manually with a specified snapshot_time (tests use current time for repeatability). |
d679729 to
d94e790
Compare
sougou
left a comment
There was a problem hiding this comment.
Reviewed to topo and vschema side of things. Those part look good.
There's a merge conflict to be resolved.
|
I have rebased the branch to resolve the merge conflict. |
enisoc
left a comment
There was a problem hiding this comment.
I did a first pass and got through everything except the e2e tests. I'll look at those in the next pass.
|
I have either responded to or resolved all the review comments. In addition, I have cleaned up the params handling and pushed down the backup dir & name computation down into mysqlctl.Backup. |
setassociative
left a comment
There was a problem hiding this comment.
I lack some context here that I'd ideally have but on an initial read this feels good. I expect there will be non-trivial changes if you pursue moving the snapshot time out of the keyspace proto and into the local metadata table so will make another pass if that lands.
I did have a couple of broad questions that didn't make sense to attach to specific lines of code:
If a master is desired for any reason, it should be initialized using TabletExternallyReparented, not InitShardMaster or PlannedReparentShard.
What is the failure mode of using InitShardMaster or PlannedReparentShard?
And:
If a tablet points at a keyspace of type SNAPSHOT should we default to -disable_active_reparents and -enable_replication_reporter=false instead of requiring them to be passed as flags? It seems like that having them independently configurable doesn't buy us much
InitShardMaster should only be used when there is no data, because it forces replica positions to match the master. It might work in this case since all replicas in a shard are expected to be at the same position, but is not recommended in general.
We had thought about turning off this behavior internally and that seemed to add unnecessary complexity to the code, but setting the flag values is a cleaner approach that we could add. |
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
…nd which gtid we restored to Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
- if there's more than 1 backup the correct one should be chosen - update data on base keyspace after backup and ensure recovery keyspace does not see the change - recover a sharded keyspace Signed-off-by: deepthi <deepthi@planetscale.com>
…for recovered data per shard Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
…up, fix bug in FindBackup for snapshot, misc review changes Signed-off-by: deepthi <deepthi@planetscale.com>
…cord, more params cleanup and refactoring from reviews Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
This PR replaces #4857
Partial fix for #4886
vt_+base_keyspace-disable_active_reparents=trueand-enable_replication_reporter=false)TabletExternallyReparented, notInitShardMasterorPlannedReparentShard.use @replicafollowed byselect ... from ks.tableuse ks@replicaoruse ks:shard@replicafollowed byselect .. from tableSigned-off-by: deepthi deepthi@planetscale.com