-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#8417] PITR: Implement delete_snapshot_schedule
Summary: This diff adds the ability to delete snapshot schedules. There is a tricky part in detecting deleted schedules on the TServer side. Suppose at some point TSTabletManager does not know schedule1. Since it knows schedules received by heartbeat there are 2 possible options: 1) It is a new schedule that was not yet received by heartbeat. 2) It is deleted schedule. So to distinguish between those 2 cases it uses the following logic. Each time the heartbeat response is received and the schedules list is updated, we also increment the `snapshot_schedules_version_` field. All missing schedules are added to the special map, along with the current value of `snapshot_schedules_version_`. So when we again find the schedule as missing, we could compare the current `snapshot_schedules_version_` and version that we had when the schedule was first found as missing. So if the master does not know this schedule also it means that it is an old schedule that was deleted. But the following could happen: Heartbeat processed by the master, but response not yet processed by tserver. The new schedule is created and sent to the tablet. Then the tablet receives the response to this heart, and it would not contain such a schedule. To avoid interpreting such schedule as deleted we wait that `snapshot_schedules_version_` to be incremented twice, before marking schedule as deleted at tserver. Test Plan: ybd --gtest_filter YbAdminSnapshotScheduleTest.Delete Reviewers: skedia, bogdan Reviewed By: bogdan Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D11868
- Loading branch information
Showing
20 changed files
with
464 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.