-
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
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
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.
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. |
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.
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. |
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.
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 <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
…nd which gtid we restored to Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
- 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 <[email protected]>
…for recovered data per shard Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
…up, fix bug in FindBackup for snapshot, misc review changes Signed-off-by: deepthi <[email protected]>
…cord, more params cleanup and refactoring from reviews Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
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.
two tiny nits
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
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.
LGTM
This PR replaces #4857
Partial fix for #4886
vt_
+base_keyspace
-disable_active_reparents=true
and-enable_replication_reporter=false
)TabletExternallyReparented
, notInitShardMaster
orPlannedReparentShard
.use @replica
followed byselect ... from ks.table
use ks@replica
oruse ks:shard@replica
followed byselect .. from table
Signed-off-by: deepthi [email protected]