Skip to content

Duplicate entries for stake pools for the same epoch sighted on sanchonet network #1901

@gregbgithub

Description

@gregbgithub

OS
Your OS: Ubuntu

Versions
The db-sync version (eg cardano-db-sync --version): 13.6.0.0
PostgreSQL version: 16.4

Build/Install Method
The method you use to build or install cardano-db-sync: prebuilt binaries

Run method
The method you used to run cardano-db-sync (eg Nix/Docker/systemd/none): systemd

Additional context
Screenshot 2024-11-15 at 9 05 24 pm

Problem Report
After deploying db-sync version 13.6.0 on sanchonet after the network was re-spun and syncing from scratch (i.e. with --recreatedb), I noticed a week or so later while testing some koios queries that pool_stat table had duplicate records for each pool for the most recent epoch. This resulted in my koios query returning duplicate data because i was doing a join with pool_stat table to fetch some data for the pool information. I since manually deleted the higher-id value rows from pool_stat, and the issue didn't seem to repeat but I figured I might as well raise a github issue so the code / logic around inserts into that table could be double checked for possible gaps/edge case scenarios.

See attached screenshot of the dupe data for one of the pools from psql output. I'll keep an eye out for this repeating on any other db sync instances going forward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions