-
Notifications
You must be signed in to change notification settings - Fork 312
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
feat(backup): 2. update and refactor meta backup engine class #2142
base: backup_restore_20241012-dev
Are you sure you want to change the base?
feat(backup): 2. update and refactor meta backup engine class #2142
Conversation
This pr removes some previous backup implementation, because the enhancement code is strongly different with the current one. Besides, this pr also disable related unit tests and function tests.
5:i64 start_time_ms; | ||
6:i64 end_time_ms; | ||
7:bool is_backup_failed; | ||
5:string backup_path; |
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.
While you change the field sequence, it would cause compatiable issues. How do you resolve it?
It's just the backup policy is incompatiable, however, the backup data is compatiable, that is to say, the backup data of the old implementation can be read normally by the new implemantation, right?
_is_periodic_backup ? "periodic" : "onetime", | ||
_cur_backup.backup_id, | ||
_cur_backup.backup_provider_type, | ||
_cur_backup.backup_path); |
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.
What about mention the URI of the backup destination?
LOG_INFO("backup path is set to {}.", path); | ||
_backup_path = path; | ||
// TODO(heyuchen): TBD | ||
// guoningshen: write app info on block service |
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.
// guoningshen: write app info on block service | |
// TODO(guoningshen): write app info on block service |
zauto_read_lock l(_lock); | ||
backup_item item = _cur_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.
zauto_read_lock l(_lock); | |
backup_item item = _cur_backup; | |
{ | |
zauto_read_lock l(_lock); | |
backup_item item = _cur_backup; | |
} |
What problem does this PR solve?
#1945
As the issue shows, meta_backup_engine will intertact with replica server and contorl backup lifecycle and status switch. This pr is the first part about it, including:
1.update init_backup and start functions
2.update backup_status and backup_item structures
3.update varieties of meta_backup_engine.h
4.rename backup_engine into meta_backup_engine
5.refactor meta_backup_engine.h including public/private, function definition order etc.