Skip to content
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

Add views across all shards #5820

Merged
merged 3 commits into from
Mar 4, 2025
Merged

Add views across all shards #5820

merged 3 commits into from
Mar 4, 2025

Conversation

lutter
Copy link
Collaborator

@lutter lutter commented Feb 14, 2025

This PR adds views for the sharded metadata tables in the primary. The views are created in the sharded namespace and cover all the tables that are maintained in individual shards:

copy_state
copy_table_state
dynamic_ethereum_contract_data_source
ethereum_networks
subgraph_deployment
subgraph_error
subgraph_features
subgraph_manifest
table_stats

It also removes a few tables that are not sharded from the shard_<name>_subgraphs namespace, namely subgraph, subgraph_version and subgraph_deployment_assignment. Those can be accessed through the primary_public namespace.

@fordN fordN requested a review from isum February 18, 2025 16:36
@lutter lutter force-pushed the lutter/sharded-views branch from 2a9a6b7 to 411c1c3 Compare March 4, 2025 15:39
lutter added 3 commits March 4, 2025 17:13
Without this, starting `graph-node` on an empty database can cause an error
that the fdw namespace does not exist
This now includes ethereum_networks, copy_state, copy_table_state, and
subgraph_features.

We no longer map subgraph, subgraph_version, and
subgraph_deployment_assignment into the shard_* namespace since these
tables are only maintained in the primary, and are mapped in the
primary_public namespace.
@lutter lutter force-pushed the lutter/sharded-views branch from 411c1c3 to 0e7b3bc Compare March 4, 2025 16:14
@lutter lutter merged commit 0e7b3bc into master Mar 4, 2025
6 checks passed
@lutter lutter deleted the lutter/sharded-views branch March 4, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants