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

support APIVersion in BackupMeta #287

Merged

Conversation

marsishandsome
Copy link
Collaborator

Signed-off-by: marsishandsome marsishandsome@gmail.com

What problem does this PR solve?

issue: pingcap/tidb#28823

when decoding SST files generated by br backup, we should know:

  • api version

the decoding metho depends on it.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

@marsishandsome marsishandsome force-pushed the feature/br-add-api-version branch 2 times, most recently from df40f70 to cf2e561 Compare October 21, 2021 08:53
@marsishandsome
Copy link
Collaborator Author

/run-all-tests

Signed-off-by: marsishandsome <marsishandsome@gmail.com>
@marsishandsome marsishandsome changed the title support DataEncode in BackupMeta support APIVersion in BackupMeta Oct 21, 2021
@marsishandsome
Copy link
Collaborator Author

/run-all-tests

if (backupMeta.getIsRawKv()) {
// TODO: ttl_enable should be witten to BackupMeta
return new RawKVDecoderV1(ttlEnabled);
if ("V1".equals(backupMeta.getApiVersion().name())) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if the api version in the backup meta is V1ttl?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

for V1 mode, the parameter ttl is designed to be passed by parameter.
not stored in the backup meta.
Cause it will be replaced by API V2 soon, so we simply do not store ttl in backup meta.

@marsishandsome marsishandsome merged commit b822762 into tikv:master Oct 25, 2021
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.

None yet

3 participants