cardano-graphql
cardano-graphql copied to clipboard
Include Graphql-Hasura Views / Data in snapshots
Currently dbsync provides snapshots to speed up database rebuilds, it seems these snapshots do not include the views required by hasura and graphql components.
Would it be possible to modify the build pipeline that is generating these snapshots to include the data required by graphql? It would massively speedup restore after upgrades.
it has been rebuilding the hasura views for quite some time now (about 6hours)
stefano@DESKTOP-9JLK7T0:~$ date
Tue Jan 25 18:07:43 UTC 2022
stefano@DESKTOP-9JLK7T0:~$ kubectl -n cardano logs cardano-6f95d7665c-l8swp -c graphql -f
{"name":"cardano-graphql","hostname":"cardano-6f95d7665c-l8swp","pid":1,"level":30,"module":"Server","msg":"Initializing","time":"2022-01-25T12:48:32.406Z","v":0}
{"name":"cardano-graphql","hostname":"cardano-6f95d7665c-l8swp","pid":1,"level":30,"module":"HasuraClient","msg":"Initializing","time":"2022-01-25T12:48:32.758Z","v":0}
{"name":"cardano-graphql","hostname":"cardano-6f95d7665c-l8swp","pid":1,"level":30,"module":"HasuraClient","msg":"Initialized","time":"2022-01-25T12:55:13.205Z","v":0}
{"name":"cardano-graphql","hostname":"cardano-6f95d7665c-l8swp","pid":1,"level":30,"module":"CardanoNodeClient","msg":"Initializing. This can take a few minutes...","time":"2022-01-25T12:55:13.206Z","v":0}
As the main dev on db-sync I know NOTHING about any tables that are not created by db-sync.
@rhyslbw @jbgi ?
@rhyslbw @jbgi any input on this? This is a pretty significant issue, as without these additional pieces of data in the snapshots - they are effectively useless for upgrades / restores - whilst being used with the standard cardano stack, and would require users to write custom sql queries instead ...
The db-sync snapshots are meant to be independent of cardano-graphql version, which is why graphql tables are not included.
Transferred the issue to https://github.com/input-output-hk/cardano-graphql
@rhyslbw any idea how a graphql tables/views quick restoration could be done in a sane way?
@jbgi it's just the Asset table. Views can be ignored since they're managed by cardano-graphql on startup.