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

br: add br backup info #836

Merged
merged 2 commits into from
Nov 24, 2021
Merged

Conversation

YuJuncen
Copy link
Contributor

cc pingcap/tidb#29969

For better utilize the already defined StorageBackend and better encoding binary keys, I decided to encode the taskinfo as protocol buffer. 🤔

@YuJuncen YuJuncen requested review from kennytm and 3pointer November 22, 2021 10:24
proto/brpb.proto Outdated
// for filling the diff data during conf changing.
// The current implementation scan [0, now) for every task ranges newly added,
// So this field is reserved for future usage.
reserved 6; reserved "last_backup_ts";
Copy link
Contributor

Choose a reason for hiding this comment

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

last_backup_ts => last_update_ts 🤔

shall we have something like create ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess the start-ts would perform as create ts?

Copy link
Contributor

Choose a reason for hiding this comment

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

start-ts could be earlier than task create time. but for now it's not required.

StorageBackend storage = 1;
// The time range for backing up.
uint64 start_ts = 2;
uint64 end_ts = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

will tikv remove this task if resolved_ts reached end_ts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess we can leave it a "done" status and let the user to delete?

Copy link
Member

@joccau joccau Nov 24, 2021

Choose a reason for hiding this comment

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

The task would exist, but the observing of stream-log has been stoped. And user can status/stop the task in this situation ?

Copy link
Contributor

@3pointer 3pointer left a comment

Choose a reason for hiding this comment

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

LGTM

@YuJuncen YuJuncen changed the base branch from master to br-stream November 23, 2021 08:05
@kennytm
Copy link
Contributor

kennytm commented Nov 23, 2021

undo the changes to pkg/coprocessor/coprocessor.pb.go and pkg/pdpb/pdpb.pb.go?

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

rest lgtm

proto/brpb.proto Outdated
// We use '/tidb/br-stream/ranges/<task-name>/<start-key> -> <end-key>'
// as the default key prefix for the target ranges for the task.
// Given the path unchanged, the dynamic config(or, hyperlink?) seems useless.
reserved "backup_range_key_prefix";
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we even need this config 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just a placeholder for the dead 'ranges' 🤔, maybe just remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rename it into "ranges" in memory of the original ranges field.

@YuJuncen YuJuncen merged commit 050aa40 into pingcap:br-stream Nov 24, 2021
3pointer pushed a commit that referenced this pull request Feb 22, 2022
* br: undo changes for coprocessor and pdpb

* br: align the spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants