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

Only backup the predicates belonging to a group. #3621

Merged
merged 3 commits into from Jul 8, 2019

Conversation

martinmr
Copy link
Contributor

@martinmr martinmr commented Jul 2, 2019

This PR changes the backup request to include the list of predicates in
the group. This list is used by the ChooseKey function to skip any keys
not belonging to the specified predicates.


This change is Reviewable

This PR changes the backup request to include the list of predicates in
the group. This list is used by the ChooseKey function to skip any keys
not belonging to the specified predicates.
@martinmr martinmr requested review from manishrjain and a team as code owners July 2, 2019 01:03
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: One comment. Do address before merging.

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


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

	stream.ChooseKey = func(item *badger.Item) bool {
		parsedKey := x.Parse(item.Key())
		for _, pred := range pr.Request.Predicates {

Better to make a map out of it, considering how many keys would need to check for this.

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


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

Previously, manishrjain (Manish R Jain) wrote…

Better to make a map out of it, considering how many keys would need to check for this.

Done.

@martinmr martinmr merged commit 536cae7 into master Jul 8, 2019
@martinmr martinmr deleted the martinmr/backup-group-preds-only branch July 8, 2019 18:29
dna2github pushed a commit to dna2fork/dgraph that referenced this pull request Jul 19, 2019
This PR changes the backup request to include the list of predicates in
the group. This list is used by the ChooseKey function to skip any keys
not belonging to the specified predicates.
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.

None yet

2 participants