-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Corrections after reworking backup/restore synchronization #3 #72018
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,9 @@ class BackupCoordinationStageSync | |
}; | ||
|
||
/// Information about all the host participating in the current BACKUP or RESTORE operation. | ||
/// This information is read from ZooKeeper. | ||
/// To simplify the programming logic `state` can only be updated AFTER changing corresponding nodes in ZooKeeper | ||
/// (for example, first we create the 'error' node, and only after that we set or read from ZK the `state.host_with_error` field). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also added more comments. |
||
struct State | ||
{ | ||
std::map<String /* host */, HostInfo> hosts; /// std::map because we need to compare states | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -667,7 +667,7 @@ def test_long_disconnection_stops_backup(): | |
# A backup is expected to fail, but it isn't expected to fail too soon. | ||
print(f"Backup failed after {time_to_fail} seconds disconnection") | ||
assert time_to_fail > 3 | ||
assert time_to_fail < 35 | ||
assert time_to_fail < 45 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is to fix the failure of |
||
|
||
|
||
# A backup must NOT be stopped if Zookeeper is disconnected shorter than `failure_after_host_disconnected_for_seconds`. | ||
|
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.
This change is to fix the failure of test
test_backup_restore_on_cluster/test_cancel_backup.py::test_cancel_restore
.