-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
has(predicate) captures nodes which had the predicate deleted #2574
Comments
It seems related but it happens in v1.0.8 so I did not bother linking this. Also I have not tried this on other predicate types. The issue is quite important as I use |
The point is that it should have been fixed. If you can make a sample mutation, the way you use it. Would help. However, in any case by your report its seem to be 80% chance of being duplicated. |
We changed the way Posting List Deletions are happening, so maybe that's causing it. Needs investigation. |
Generate the full posting list based on the read timestamp, so we can determine if it is empty or not. If empty, then has should not pick up the UID. Similarly, use Btree to pick up posting lists from memory, also considering whether they have a valid posting keeping transactional properties intact. This fixes #2574.
This should now be fixed. Can you test, @slawo ? |
Hey @manishrjain I did a test with {
"set": [
{
"obj.date_ended": "2018-08-14T11:56:46Z"
},
{
"obj.date_ended": "2018-08-14T11:56:46Z"
},
{
"obj.date_ended": "2018-08-14T11:56:46Z"
},
{
"obj.date_ended": "2018-08-14T11:56:46Z"
},
{
"obj.date_ended": "2018-08-14T11:56:46Z"
}
]
}
{
delete {
<0x1> <obj.date_ended> * .
<0x4> <obj.date_ended> * .
<0x7> <obj.date_ended> * .
<0x8> <obj.date_ended> * .
<0x9> <obj.date_ended> * .
}
} And tried too {
delete {
<0x1> * * .
<0x4> * * .
<0x7> * * .
<0x8> * * .
<0x9> * * .
}
} |
Thanks, @MichelDiz ! |
Generate the full posting list based on the read timestamp, so we can determine if it is empty or not. If empty, then has should not pick up the UID. Similarly, use Btree to pick up posting lists from memory, also considering whether they have a valid posting keeping transactional properties intact. This fixes dgraph-io#2574.
Bug report
Desktop (please complete the following information):
if Containerization (please complete the following information):
Describe the bug
When using has(predicate) in queries we have strange results. After some debugging I found that many nodes without having the predicate were included in results.
The ones I have identified had the predicates removed.
This happens with dates, but I have not tested other predicate types.
To Reproduce
Steps to reproduce the behavior:
returns
...
Expected behavior
not receiving nodes where predicates don't exist
Additional context
This is a fresh install of dgraph with all data added today using the dgo driver using
api.NQuad
The text was updated successfully, but these errors were encountered: