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

release/v1.2: fix(Dgraph): update reverse index when updating single UID predicates. #6775

Closed
wants to merge 2 commits into from

Conversation

danielmai
Copy link
Contributor

@danielmai danielmai commented Oct 22, 2020

Cherry-picks #5868 and #4755 to fix reverse index bug and tests in v1.2.

------- Stdout: -------
=== RUN   TestSystem/overwrite_uid_predicates_reverse_index
TestSystem/overwrite_uid_predicates_reverse_index: json.go:79: Expected JSON and actual JSON differ:
{                {
"reverse": [                "reverse": [
{                    {
                    >        "name": "Bob",
                    >        "~best_friend": [
                    >          {
                    >            "name": "Alice"
                    >          }
                    >        ]
                    >      },
                    >      {
"name": "Carol",                  "name": "Carol",
"~best_friend": [                  "~best_friend": [
{                      {
"name": "Alice"                    "name": "Alice"
}                      }
]                      ]


This change is Reviewable

Docs Preview: Dgraph Preview

We used to compute reverse count indexes twice while reindexing.
First, while computing reverse edges, and then later while explicitly
computing reverse count index. Now, we use a different function
while reindexing reverse edges and do not compute the reverse
count indexes there any more.
#5868)

When updating a single uid predicate with a reverse index, the existing entry in the
reverse index should be deleted first.

Fixes DGRAPH-1738
@danielmai
Copy link
Contributor Author

Closing this in favor of #6748

@danielmai danielmai closed this Oct 22, 2020
@joshua-goldstein joshua-goldstein deleted the danielmai/v1.2-fix-tests branch August 18, 2022 23:49
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.

3 participants