Skip to content

[Bug] File Datasource Indexing Failing Due To Database Constraint Violated Error #6297

@itsjerryokolo

Description

@itsjerryokolo

Bug report

I deployed this subgraph to Studio
https://github.com/ebarvatech/subgraph-ipfs-poc but it's failing with the error below. This is the same error @ebarvatech initially reported.

Deployment: QmPx8bnb49ehT4DX1DPF6iTvtR2ihSP1FwRcABNBdnaYcB

Subgraph writer failed, error: database constraint violated: duplicate key value violates unique constraint "metadata_pkey": Key (vid)=(153163558887096420) already exists., runner_index: 1049

I assumed this was due to Metadata entity trying to overwrite itself upon multiple triggers, I attempted to trigger this handler just once in a new deployment(QmY6EjGQULAp9Ha3p4JgPABPfV827VxH2yMSYh6mtwbPZL), but it has now failed also with the error below

Error: Failed to transact block operations

@ebarvatech did mention in the chat that he runs the purchase method once (on a new contract). As a result - the same error (database constraint violated:). Any creation 2+ same IPFS data sources in one transaction causes the indexing error

Relevant log output

Deployment:  
Error: Failed to transact block operations

IPFS hash

No response

Subgraph name or link to explorer

No response

Some information to help us out

  • Tick this box if this bug is caused by a regression found in the latest release.
  • Tick this box if this bug is specific to the hosted service.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

OS information

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions