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

fix(Query): Fix cascade pagination with 0 offset. #7636

Merged
merged 3 commits into from
Mar 23, 2021

Conversation

minhaj-shakeel
Copy link
Contributor

@minhaj-shakeel minhaj-shakeel commented Mar 23, 2021

Fixes DGRAPH-3211.
This PR fixes 2 bugs related to the @cascade directive.
1- Pagination was not working with Offset = 0.
2- @cascade directive not working with sort queries.


This change is Reviewable

@minhaj-shakeel minhaj-shakeel changed the base branch from master to release/v21.03 March 23, 2021 05:03
Copy link
Contributor

@abhimanyusinghgaur abhimanyusinghgaur left a comment

Choose a reason for hiding this comment

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

If not now, maybe later, but, we should add one test with a big enough data set to ensure @cascade works correctly with sorting as well after this fix.

Copy link
Contributor

@vmrajas vmrajas left a comment

Choose a reason for hiding this comment

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

Can you also add a test case for the other bug which was solved with this PR, sort not working with @cascade .

Copy link
Contributor Author

@minhaj-shakeel minhaj-shakeel left a comment

Choose a reason for hiding this comment

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

I will create a ticket for it. Will require a huge dataset for writing test.

Reviewable status: 0 of 2 files reviewed, all discussions resolved (waiting on @manishrjain, @martinmr, @pawanrawal, and @vvbalaji-dgraph)

@minhaj-shakeel minhaj-shakeel merged commit 95deb0a into release/v21.03 Mar 23, 2021
@minhaj-shakeel minhaj-shakeel deleted the minhaj/fix-cascade branch March 23, 2021 14:01
danielmai added a commit that referenced this pull request Jun 3, 2021
danielmai added a commit that referenced this pull request Jun 3, 2021
This reverts commit 95deb0a.

Reverting this commit fixes Alpha panics when using both ordering and
@cascade in a query:

    2021/06/03 21:27:33 3 0
    github.com/dgraph-io/dgraph/x.AssertTruef
    	/ext-go/1/src/github.com/dgraph-io/dgraph/x/error.go:107
    github.com/dgraph-io/dgraph/worker.intersectBucket
    	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/sort.go:694
    github.com/dgraph-io/dgraph/worker.sortWithIndex
    	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/sort.go:286
    github.com/dgraph-io/dgraph/worker.processSort.func2
    	/ext-go/1/src/github.com/dgraph-io/dgraph/worker/sort.go:518
    runtime.goexit
    	/usr/local/go/src/runtime/asm_amd64.s:1371
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