graphprotocol / graphprotocol/graph-node

[Bug] Ordering by child attribute is not always deterministic

Open
#5,312 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Stale
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Bug report

In a query for parents that orders by child__id, if many parents belong to the same child, the ordering is not deterministic because the SQL query only orders by child.id. To make it deterministic, we need to order by child.id, parent.id

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

The issue names no files or tests; begin by locating the query and ordering entry point for parents ordered by child__id. Done means the ordering is deterministic when multiple parents share a child, with coverage demonstrating that parent.id is included in the ordering.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, rust, sql
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.