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

indexer formal restore 1/N: restore packages and move objects #18886

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

gegaowp
Copy link
Contributor

@gegaowp gegaowp commented Aug 1, 2024

Description

first of the stack PR to restore indexer from sui archives & formal snapshot

Test plan

test locally with GCS buckets, local snapshot dir and local PG server

██████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 75 out of 555 move object files restored (Restored 569395 live move objects and 0 wrapped or deleted objects from epoch_500/1_53.obj)2024-09-10T14:21:39.854508Z  INFO sui_indexer::restorer::formal_snapshot: Finished downloading move object file Path { raw: "epoch_500/1_125.obj" }
2024-09-10T14:21:44.111960Z  INFO sui_indexer::restorer::formal_snapshot: Start persisting 565556 move objects from epoch_500/1_125.obj
2024-09-10T14:22:12.142760Z  INFO sui_indexer::store::pg_indexer_store: Persisted 563126 objects snapshot elapsed=7058.20103075
2024-09-10T14:22:12.142830Z  INFO sui_indexer::restorer::formal_snapshot: Finished persisting 0 wrapped or deleted objects from epoch_500/1_86.obj
[10:46:20]

need to benchmark in the production env


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:
  • REST API:

Copy link

vercel bot commented Aug 1, 2024

@gegaowp is attempting to deploy a commit to the Mysten Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented Aug 1, 2024

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

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 3:42pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 3:42pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 3:42pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Sep 19, 2024 3:42pm

@gegaowp gegaowp requested review from williamrobertson13 and pchrysochoidis and removed request for a team August 1, 2024 19:07
@github-actions github-actions bot added the Type: Documentation Improvements or additions to documentation label Aug 1, 2024
@gegaowp gegaowp changed the base branch from idx-formal-restore to main August 1, 2024 19:08
@gegaowp
Copy link
Contributor Author

gegaowp commented Sep 10, 2024

@bmwill @emmazzz I changed the formal snapshot read from GCS to S3 and updated it with the test plan, can I have a review? next step is to benchmark it in GKE with CloudSQL and I am working on it.

Copy link
Contributor

@bmwill bmwill left a comment

Choose a reason for hiding this comment

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

@williampsmith would you be able to take a look at this as well?

crates/sui-indexer/src/restorer/formal_snapshot.rs Outdated Show resolved Hide resolved
crates/sui-indexer/src/restorer/formal_snapshot.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

It would be good to get some doc comments in here before we land it!

Copy link
Contributor

@williampsmith williampsmith left a comment

Choose a reason for hiding this comment

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

Overall this LGTM. Curious to see how this performs, as it looks like you have a better parallelism construction in the object download portion. We should do the same on the sui side.

crates/sui-indexer/src/restorer/formal_snapshot.rs Outdated Show resolved Hide resolved
@gegaowp
Copy link
Contributor Author

gegaowp commented Sep 19, 2024

@williampsmith I benchmarked the restorer, the whole restorer to PG DB took about 3 hours while seems PG DB was the bottleneck.

@gegaowp gegaowp enabled auto-merge (squash) September 19, 2024 15:49
@gegaowp gegaowp merged commit f3825b1 into MystenLabs:main Sep 19, 2024
43 of 44 checks passed
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.

4 participants