Skip to content
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

Open
wants to merge 10 commits into
base: backup_restore_20241012-dev
Choose a base branch
from

Conversation

ninsmiracle
Copy link
Contributor

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.

5:i64 start_time_ms;
6:i64 end_time_ms;
7:bool is_backup_failed;
5:string backup_path;
Copy link
Member

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);
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// guoningshen: write app info on block service
// TODO(guoningshen): write app info on block service

Comment on lines +84 to +85
zauto_read_lock l(_lock);
backup_item item = _cur_backup;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
zauto_read_lock l(_lock);
backup_item item = _cur_backup;
{
zauto_read_lock l(_lock);
backup_item item = _cur_backup;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants