graphprotocol / graph-node

Graph Node indexes data from blockchains such as Ethereum and serves it over GraphQL
https://thegraph.com
Apache License 2.0
2.92k stars 980 forks source link

Graphman restart: Handle cases where multiple subgraph names reference a deployment ID #5674

Closed isum closed 1 month ago

isum commented 1 month ago

There was an issue that prevented graphman restart from running if a deployment ID was referenced by multiple subgraph names. This PR fixes that.

Closes #5670

zorancv commented 1 month ago

It actually pauses and resumes the first of the two deployments. The second one is not accessible. Both names would point to the whichever happens to be first. If that's desired behaviour then is fine IMO.

lutter commented 1 month ago

In node/src/manager/deployment.rs, there's a similar helper locate_unique. I don't think this duplication is a big deal, just wanted to point that out.

isum commented 1 month ago

@lutter The code duplication will eventually be eliminated once more commands are added to Graphman GraphQL API.