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

Don't traverse immutable layer if deleteBelowTs > 0 #4204

Merged
merged 4 commits into from
Oct 23, 2019

Conversation

pawanrawal
Copy link
Contributor

@pawanrawal pawanrawal commented Oct 22, 2019

S P * deletions were not working when data was loaded using bulk loader or was in the immutable layer. This PR makes sure we don't iterate over the immutable layer when we have a delete marker. Earlier after doing a S P * deletion, we were still returning the first uid from the immutable layer.

Fixes #4182

This bug was introduced in #3105.


This change is Reviewable

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.


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

@pawanrawal pawanrawal marked this pull request as ready for review October 22, 2019 22:05
Copy link
Contributor

@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.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @manishrjain)

Copy link
Contributor

@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.

Have Manish take a look at this just to be sure.

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @manishrjain)

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: See my comment.

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


posting/list.go, line 105 at r2 (raw file):

func (it *pIterator) init(l *List, afterUid, deleteBelowTs uint64) error {
	if deleteBelowTs > 0 && deleteBelowTs <= l.minTs {

Please check when it broke. And add that PR which broke it in the description.

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.

Very minor readability comments. No blockers here.


Reviewed with ❤️ by PullRequest

}`, `
{
"me": []
}`))
Copy link

Choose a reason for hiding this comment

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

I think this format would be better for readability:

    }`,
  ),
)

})
require.NoError(t, err)

t.Run("Get list of friends", s.testCase(`
Copy link

Choose a reason for hiding this comment

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

Let's have s.testCase( to be on a new line for readability.

@pawanrawal pawanrawal merged commit 97c5bca into master Oct 23, 2019
@pawanrawal pawanrawal deleted the pawanrawal/fix-4180 branch November 28, 2019 23:41
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.

V1.1 Urgent Issue: Cannot Delete Outgoing Edge with N P * pattern After DGraph Upgrade
3 participants