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

Split keys during backup restore. #4912

Merged
merged 10 commits into from
Mar 16, 2020
Merged

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Mar 10, 2020

If the list is too big and is not split before writing it too disk, we could end up in the situation
described in #4733. So the posting lists should be split before writing them to disk.


This change is Reviewable

Docs Preview: Dgraph Preview

Currently, split posting lists are split in one go. This means that the
resulting splits will be added to the list even if they are still too
big. This change recursively splits the parts of the lists until all of
them are smaller than the threshold.
@martinmr martinmr requested review from manishrjain and a team as code owners March 10, 2020 22:08
@martinmr martinmr changed the base branch from martinmr/recursive-splits to master March 11, 2020 20:12
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: Got a comment.

Reviewed 2 of 2 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @martinmr)


worker/restore.go, line 155 at r1 (raw file):

						return 0, err
					}
				} else {

else if size > something { roll up } else { just write } // the last one would be the most common case.

In fact, the first if can do the last one as well.

Copy link
Contributor Author

@martinmr martinmr 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 3 files reviewed, 1 unresolved discussion (waiting on @manishrjain)


worker/restore.go, line 155 at r1 (raw file):

Previously, manishrjain (Manish R Jain) wrote…

else if size > something { roll up } else { just write } // the last one would be the most common case.

In fact, the first if can do the last one as well.

Done.

@martinmr martinmr merged commit 6251673 into master Mar 16, 2020
@martinmr martinmr deleted the martinmr/restore-split-keys branch March 16, 2020 23:21
martinmr added a commit that referenced this pull request Mar 17, 2020
If the list is too big and is not split before writing it too disk, we could end up in the situation
described in #4733. So the posting lists should be split before writing them to disk.
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