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

Pagination param "after" does not work when using func: uid(v) #6058

Closed
wants to merge 154 commits into from

Conversation

antblood
Copy link
Contributor

@antblood antblood commented Jul 22, 2020


This change is Reviewable

  1. Pagination param "after" does not work when using func: uid(v). For ex:
    for query
{
  var(func: has(name@en), first: 50) {
    test as uid
  }

  ss(func: uid(test), first: 2, after: 0x6) {
    uid
  }
}

before the result was

{
  "data": {
    "ss": [
      {
        "uid": "0x4"
      },
      {
        "uid": "0x6"
      }
    ]
  }
}

now the result is

{
  "data": {
    "ss": [
      {
        "uid": "0x7"
      },
      {
        "uid": "0x8"
      }
    ]
  }
}
  1. Fixes Pagination param "after" does not work when using func: uid(v) #5242.
  2. Fixes DGRAPH-1273.

Docs Preview: Dgraph Preview

@antblood antblood requested a review from pawanrawal as a code owner July 22, 2020 21:22
@antblood antblood changed the title Neeraj/pagination uid #WIP Neeraj/pagination uid Jul 22, 2020
@antblood antblood changed the title #WIP Neeraj/pagination uid #WIP afterUID not working with UIDs Jul 22, 2020
@antblood antblood changed the title #WIP afterUID not working with UIDs "after" not working with UID variable Jul 23, 2020
@antblood antblood changed the title "after" not working with UID variable Pagination param "after" does not work when using func: uid(v) Jul 23, 2020
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.

Needs tests in the query package.

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


query/query.go, line 2013 at r1 (raw file):

			})
			if sg.Params.AfterUID > 0 {
				i := 0

Use something like https://golang.org/pkg/sort/#Search to find the bound instead of iterating over the array.

all-seeing-code and others added 8 commits July 23, 2020 22:55
This is so we can know what the config is set to in Zero.

Example:

I0721 04:39:20.865338      16 run.go:187] Setting Config to: {bindall:true myAddr:zero1:5180 portOffset:100 nodeId:1 numReplicas:3 peer: w:zw rebalanceInterval:480000000000 LudicrousMode:false}
This PR skips the flaky subscriptions tests TestSubscriptionAuth_SameQueryAndClaimsButDifferentExpiry_ShouldExpireIndependently
and TestSubscriptionAuth_SameQueryDifferentClaimsAndExpiry_ShouldExpireIndependently .
Currently the code keeps tracks of the split startUids and updates them
as the posting lists are split or empty parts are removed. Instead,
update the list of startUids at the end of each step based on the
contents of the map of startUids to posting list. This removes the need
of keeping track of the same piece of information in two different ways.

Also, fix a bug where the empty parts were removed from the list of
splits but not from the map. This caused empty posting lists to be
written to disk although it didn't affect normal execution because those
parts were not accessible from the main posting list.
Copy link
Contributor Author

@antblood antblood 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 @martinmr and @pawanrawal)


query/query.go, line 2013 at r1 (raw file):

Previously, martinmr (Martin Martinez Rivera) wrote…

Use something like https://golang.org/pkg/sort/#Search to find the bound instead of iterating over the array.

Done.

Arijit Das and others added 7 commits July 27, 2020 09:26
… true. (#6053)

* Fix auth rewriting for nested queries when RBAC rule is true.
Since we don't use GitHub issues anymore, error messages should not link to them. Updating the error messages to say so.
…#6074)

Fixes GRAPHQL-590.

This PR fixes wrong parameter value being supplied in the URL query parameters for `@custom` fields. Earlier, all the nodes used to get the same value for a query parameter, which has been fixed, and now every node gets the value corresponding to its dgraph fields in the `@custom` query parameters.
Make sure both the main and reverse edges are deleted when the main
edge is deleted.
@CLAassistant
Copy link

CLAassistant commented Sep 1, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
13 out of 14 committers have signed the CLA.

✅ anand-chandrashekar
✅ manishrjain
✅ jarifibrahim
✅ parasssh
✅ danielmai
✅ anurags92
✅ NamanJain8
✅ gja
✅ harshil-goel
✅ JatinDevDG
✅ abhimanyusinghgaur
✅ martinmr
✅ antblood
❌ Neeraj Battan


Neeraj Battan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@antblood antblood closed this Sep 2, 2020
@antblood antblood deleted the neeraj/paginationUID branch September 2, 2020 02:30
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.

Pagination param "after" does not work when using func: uid(v)