Skip to content

num_uids query metrics returns a count with empty key #4367

@danielmai

Description

@danielmai

What version of Dgraph are you using?

master (747c847)

Have you tried reproducing the issue with the latest release?

No, query metrics aren't in the latest release (v1.1.0).

What is the hardware spec (RAM, OS)?

Ubuntu Linux

Steps to reproduce the issue (command/config used to run Dgraph).

  1. Run a Dgraph cluster
  2. Run a query using uid()
{
  q(func: uid(0x1))
}
  1. The query metrics for num_uids has an empty string for a JSON key:
{
  "data": {
    "q": []
  },
  "extensions": {
...
    "metrics": {
      "num_uids": {
        "": 1
      }
    }
  }
}

If I run the following query, I get a different num_uids count based on the number of uid() lookups there are.

{
  q(func: uid(0x1,0x2,0x3)) 
}
{
  "data": {
    "q": []
  },
  "extensions": {
...
    "metrics": {
      "num_uids": {
        "": 3
      }
    }
  }
}

Expected behaviour and actual result.

It's not obvious to me what "": 3 is referring to at first glance. Can it have a better name?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/querylangIssues related to the query language specification and implementation.kind/enhancementSomething could be better.status/acceptedWe accept to investigate/work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions