graphql-engine: Incorrect LIMIT behaviour in v2.1.0
Version Information
I’ve upgraded graphql-engine from v2.0.10 to v2.1.0.
Environment
Google Cloud Platform: Kubernetes Engine
What is the current behaviour?
Memory usage grows over time (possible memory leak)
Screenshots or Screencast
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 22 (19 by maintainers)
@maxpain Really sorry for the delay here. We did triage this internally but missed to update here.
There are 2 aspects to the current “bug”:
The issue only happens for a manual object relationship. Object relationships are typically meant for a n:1 or a 1:1 relationship i.e. the right hand side relation returns at max one row for a given left hand side row. But, in your case there are multiple rows on the right hand side for the same row. In older versions of Hasura, this would return any one row (randomly selected) for the relationship. It’s not clear if this is intentional since an array relationship would be better suited here.
We will fix the behaviour to return a single randomly selected row in such a scenario (older behaviour) soon. But the priority of this is not urgent since this is a rather unexpected configuration.
Thanks, pasting repro artifacts here:
metadata.json.txt dump.sql.txt
Query (with user role or admin role):
Result (wrong):
@jberryman I’ve sent you
explain analyzeresults of the same query running onv2.1.0againstv2.0.10Yes, I will compare generated SQL queries and do
EXPLAIN ANALYZEon bothv2.1.0andv2.0.10versions on the same dataset.No
Yes
Done