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

[pick] indexer: uhaul breaking changes from park to main (#17439) #17605

Merged
merged 9 commits into from
May 9, 2024

Conversation

amnn
Copy link
Member

@amnn amnn commented May 9, 2024

Description

Pick schema changes that were recently landed in main for the indexer to the 2024.4 release branch.

Test plan

sui$ cargo nextest run -p sui-indexer
sui$ cargo nextest run -p sui-graphql-rpc
sui$ cargo nextest run -p sui-graphql-e2e-tests --features pg_integration

Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

gegaowp and others added 9 commits May 9, 2024 11:36
For event and object types stored in the indexer tables, this PR stores
the `package`, `module` and `name` of the `StructTag` in addition to the
full type information. With this change all the queries we do to filter
by type in graphql will be exact match instead of using `LIKE`.

I chose to go with still keeping the full type field for backward
compatibility (since indexer and gql are on different release
schedules), testability (so we can easily test performance difference
using the old and new way against the same db) and simplicity (so we
don't need to worry too much about type params).

Existing graphql tests and added indexer ingestion tests.

---
If your changes are not user-facing and do not break anything, you can
skip the following section. Otherwise, please briefly describe what has
changed under the Release Notes section.

- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
## Description 

the original intention was to partition tx_ tables such that they can be
easily pruned by dropping old partitions, however that indicates that
for each query with a "lookup key" like sender, we will have to scan all
partitions, which can be costly.

also after pulling the numbers from DB, the sizes of these tables are
relatively small and thus we can take the extra storage for now in favor
of reading side perf.

## Test plan 

benchmark and experiment 

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
@amnn amnn requested review from gegaowp and a team May 9, 2024 11:09
@amnn amnn self-assigned this May 9, 2024
Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) May 9, 2024 11:09am
sui-kiosk ⬜️ Ignored (Inspect) May 9, 2024 11:09am
sui-typescript-docs ⬜️ Ignored (Inspect) May 9, 2024 11:09am

Copy link
Contributor

@gegaowp gegaowp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gogogo

@amnn amnn merged commit 109cf8b into releases/sui-graphql-rpc-v2024.4.0-release May 9, 2024
46 of 47 checks passed
@amnn amnn deleted the amnn/pick-uhaul branch May 9, 2024 14:15
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