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

Fixes the toBackupList function by removing the loop #3869

Merged
merged 2 commits into from
Aug 26, 2019
Merged

Conversation

gitlw
Copy link

@gitlw gitlw commented Aug 26, 2019

This PR fixes the issue #3831 described in the uncompleted PR #3832 , which is blocking the 1.1 release.


This change is Reviewable

@gitlw gitlw requested review from manishrjain and a team as code owners August 26, 2019 21:54
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ A review job has been created and sent to the PullRequest network.


@gitlw you can click here to see the review status or cancel the code review job.

Copy link
Contributor

@manishrjain manishrjain left a comment

Choose a reason for hiding this comment

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

:lgtm: Test it thoroughly.

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

I have a question inline regarding the new check being added to short-circuit and how it impacts code in one of the cases below.


Reviewed with ❤️ by PullRequest

list.Kv = append(list.Kv, kvs...)
case posting.BitSchemaPosting:
var valCopy []byte
if !item.IsDeletedOrExpired() {
Copy link

Choose a reason for hiding this comment

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

It seems like this case may always be hit now that you have a check at the top for:

if item.Version() < pr.Request.SinceTs || item.IsDeletedOrExpired() {
    return list, nil
}

Wondering if this case can be simplified from this or if that initial if statement needs to be adjusted for this case?

Copy link
Author

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

I tested backup and restore of the 21million data set under 2 configs

  • 1 alpha and 1 zero
  • 3 alphas and 1 zero with replication 1 (each alpha in an independent group)

and for each config the result is validated using the system/21million/run_test.go

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gitlw)

Copy link
Author

@gitlw gitlw left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @manishrjain and @pullrequest[bot])


ee/backup/backup.go, line 234 at r1 (raw file):

Previously, pullrequest[bot] wrote…

It seems like this case may always be hit now that you have a check at the top for:

if item.Version() < pr.Request.SinceTs || item.IsDeletedOrExpired() {
    return list, nil
}

Wondering if this case can be simplified from this or if that initial if statement needs to be adjusted for this case?

Great catch, I've removed the if condition check.

@gitlw gitlw merged commit 00a2914 into master Aug 26, 2019
@gitlw gitlw deleted the gitlw/fix_backup branch August 26, 2019 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants