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

Flat response in Master (maybe added @normalize by default) #3150

Closed
MichelDiz opened this issue Mar 16, 2019 · 6 comments
Closed

Flat response in Master (maybe added @normalize by default) #3150

MichelDiz opened this issue Mar 16, 2019 · 6 comments
Assignees
Labels
kind/bug Something is broken.

Comments

@MichelDiz
Copy link
Contributor

MichelDiz commented Mar 16, 2019

  • What version of Dgraph are you using?
Dgraph version   : v1.0.12-rc3-225-g207e1349
Commit SHA-1     : 207e1349
Commit timestamp : 2019-03-15 16:22:58 -0700
Branch           : master
Go version       : go1.12

Captura de Tela 2019-03-15 às 23 42 01

@martinmr
Copy link
Contributor

I am not able to reproduce this result in master. I opened #3168 to add a test with this exact case and I am seeing an unflattened response.

@MichelDiz
Copy link
Contributor Author

Hey @martinmr I've tested again - Still happening on master in my machine. I cleanup everething on my machine. Cleaned the go path. Did "go get (...)/dgraph/..." and "make dgraph". And ./dgraph bulk -f . -s 1million.schema - But my schema was empty. I'll try with a updated schema. However I guess this should not happen even with empty schema.

@MichelDiz
Copy link
Contributor Author

MichelDiz commented Mar 18, 2019

Okay, by adding "[uid]" in the "director.film" it worked again. So we should set [uid] (in the schema parser) by default to avoid this. This would assume that Edges are always one to many until the user sets otherwise.

But there is a small problem, I will investigate this. This new feature was not supposed to take on a one-to-one relationship? I am seeing with this behavior a relation one to many but in list. That's odd.

@martinmr
Copy link
Contributor

Can you clarify the last paragraph. I don't understand.

Also, the test I am running did not have the pred "director.film" in the schema but it still worked. However, I am using transactions (basically the live loader) to load the data. I am guessing the bulk loader might be the root cause of this issue.

@MichelDiz
Copy link
Contributor Author

MichelDiz commented Mar 18, 2019

Forget the last paragraph. I've Just tested and indeed the only issue seems to be bulkload.

So, bulkload needs to add [uid] by default.

@martinmr
Copy link
Contributor

Ok. I'll look into the bulkload. I remember adding logic to make default predicates equivalent to [uid] but that was only in the liveloader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something is broken.
Development

No branches or pull requests

2 participants