gitcoinco / grants-stack-indexer

Grants Stack Indexer
https://grants-stack-indexer-v2.gitcoin.co/graphiql
29 stars 23 forks source link

investigate data inconsistencies #561

Open boudra opened 4 months ago

boudra commented 4 months ago

when reindexing there are a a lot of warnings with some events not not finding rounds or projects, investigate why this happens and ensure this is not a bug and verify data integrity.

check the logs for errors like:

error: insert or update on table "rounds" violates foreign key constraint "rounds_projects_fkey"
    at /usr/src/app/node_modules/pg/lib/client.js:526:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async PostgresConnection.executeQuery (file:///usr/src/app/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js:69:28)
    at async file:///usr/src/app/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:35:28
    at async DefaultConnectionProvider.provideConnection (file:///usr/src/app/node_modules/kysely/dist/esm/driver/default-connection-provider.js:10:20)
    at async DefaultQueryExecutor.executeQuery (file:///usr/src/app/node_modules/kysely/dist/esm/query-executor/query-executor-base.js:34:16)
    at async InsertQueryBuilder.execute (file:///usr/src/app/node_modules/kysely/dist/esm/query-builder/insert-query-builder.js:515:24)
    at async Database.applyChange (file:///usr/src/app/dist/src/database/index.js:255:17)
    at async file:///usr/src/app/dist/src/index.js:445:25
    at async Promise.all (index 0)
    at PostgresConnection.executeQuery (file:///usr/src/app/node_modules/kysely/dist/esm/dialect/postgres/postgres-driver.js:88:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)