-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relations public.Withdrawal and public.Epoch does not exist #897
Comments
Hi @mkocur-ledger I think the issue for the Epoch and withdrawal table missing could be issue with the hasura migration and not the db-sync-snapshot. Can you try to see if there are errors on the graphql-background & hasura while applying the migrations? For the token metadata registry server, are you running the default container as it is from the repo? Table missing seems improbable. |
Hi @Kartiiyer12, thanks for your interest in my bugreport. About the migration, I didn't create any of my own. These are related log messages:
|
These are migration folder that should be applied - https://github.com/cardano-foundation/cardano-graphql/tree/16ed6d71dbe95ff9e7d959ea51a8476da668684c/packages/api-cardano-db-hasura/hasura/project/migrations/default/1589369664961_init. |
I have made a fresh installation and after applying this: https://github.com/cardano-foundation/cf-token-metadata-registry/blob/47f6cf08515f45c3dc11968a7e15a791875cf59c/api/src/main/resources/db/migration/postgresql/V0__metadata_server_db_init.sql I see no errors. Created an issue that it is not applied automatically: About your question, there are customizations, yes, but I can see messages in background pod that it is actually inserting assets and the assets were synced in graphql to 100%, so I assume it works. |
I'll check the issue in the token-registry next week and fix this. Thanks for finding it! And I'm glad it worked for you. |
Actually @Kammerlo please reopen this. I have disabled INFO messages and I found those errors again (I have applied the sql file you mentioned on my database but it didn't help):
Full log:
|
Could you provide logs from hasura service? Because this service should apply automatically the sql files and create these tables. |
@mkocur-ledger I further investigated what could be the problem. I found an error within the sql file, which hindert hasura to finish the migration. You can find the PR here: #898 Could you check if this solves the problems for your issue as well? |
@Kammerlo I have seen this, I was actually supposed to create a PR or bugreport, but didn't find time yet. Actually, this is not going to help, I have run those SQL queries already against the database (fixing the missing comma). // full logs as requested:
//edit
|
What about your background service? Is this one running properly? |
|
@mkocur-ledger I doubled checked and tested the whole setup multiple times and couldn't reproduce the issue. Within your logs I see that the Hasurabackgroundclient is initialized. The schemas are created on this line
initialized
Another Idea I want to check is if db-sync is running properly. Could you check the logs if there is something noticeable? |
Except what I found in the log at the very top of this ticket, not really. But that was fixed by adding metadata table manually. Maybe you just miss those messages? I can see them when:
(BTW I start hasura, background, ogmios and graphql when db-sync reaches current epoch) |
Hi @mkocur-ledger Can you check in the database directly, the Epoch and the Withdrawal table exists? |
Summary
Hello!
I have restored a snapshot with db-sync:
(https://update-cardano-mainnet.iohk.io/cardano-db-sync/13.5/db-sync-snapshot-schema-13.5-block-10823207-x86_64.tgz)
hasura/graphql-engine:v2.43.0.cli-migrations-v2 is reporting public.Withdrawal and public.Epoch relations missing:
The sync status:
I have restarted graphql, tmr, hasura, background components after the sync was completed to face the same issue.
db-sync: "13.5.0.2"
node: "9.1.1"
ogmios-server: "6.6.2"
graphql-engine: "v2.43.0.cli-migrations-v2"
graphql-server: "8.2.2"
graphql-background: "8.2.2-mainnet"
cf-token-metadata-registry-api: "1.0.2"
postgres: 15.6
Steps to reproduce the bug
No response
Actual Result
Some db data missing after snapshot restore.
Expected Result
No errors
Environment
Kubernetes
{
os: {
arch: 'x64',
cpus: { count: 48, model: 'Intel(R) Xeon(R) Gold 6312U CPU @ 2.40GHz' },
release: '5.15.0-117-generic',
totalMem: 269877899264,
type: 'Linux'
},
version: '8.0.0'
}
Platform
Platform version
Ubuntu 22.04.4 LTS
Runtime
Runtime version
No response
The text was updated successfully, but these errors were encountered: