24.0.0 - Does the LimitMutationsNquad update limit node/edge graph traversal during the query?

We’re seeing a stacktrace like this:

Caused by: io.grpc.StatusRuntimeException: UNKNOWN: : Exceeded query edge limit = 1000000. Found 1393378 edges.

In the version 24.0.0 changelog, it lists this:
fix(core): limit #edges using LimitMutationsNquad config and add logs in #9010

Can this be used a limit when the query runs to limit the number of edges a specific node can produce?

1 Like

One man’s feature is another man’s bug

Hi Ryan,

The limit is checked against a cumulative counter of all edges encountered during a query, so it is not specific to one predicate or specific node.

Note it is also a query limit (configured via query-edge). There is another overall limit on mutation total triples created ( configured via mutations_nquad).

These are more to prevent server overload or denial-of-service via huge queries, vs specific data shape constraints.

Thanks for the clarification.

We (unfortunately) have some dirty data nodes where tens of thousands, or more, edges connect off of a node. Is there a way tell dgraph not to return back more than x amount of edges for a node? For example, maybe we don’t want to return more than 100 edges per node because for the use-case this must be bad data.

Use first: 100 (see Pagination - Query language)