dgraph-io / dgraph-io/dgraph

[BUG]: Misuse of variable in UID function fails silently

Open
#8,806 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dgraph exp/beginner kind/bug Stale
Dominant language
Go
Stars
21.8k
Forks
1.6k
Avg merge
2d 5h
Merged PRs (30d)
9

Description

What version of Dgraph are you using?

latest

Tell us a little more about your go-environment?

N/A

Have you tried reproducing the issue with the latest release?

Yes

What is the hardware spec (RAM, CPU, OS)?

N/A

What steps will reproduce the bug?

Run a query like this

q(func: uid(val(A)) )
Expected behavior and actual result.

q(func: uid(val(A)) ) = Silent return it should fail

q(func: uid(A) ) = Correct one.

Additional information

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported query q(func: uid(val(A))) and compare it with q(func: uid(A)). Trace the UID query handling and add a regression test showing that misuse produces an error instead of silently returning; the issue is done when the invalid form fails clearly while the valid form still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.