-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[formal snapshots] Support without DB Checkpoint upload (#14645)
## Description Today in order for formal snapshots to work, we also need to enable full db checkpoint config, including providing an object store and awaiting upload. Some node operators may want to only upload formal snapshots without incurring the cost of also uploading and maintaining a db checkpoint snapshot. Moreover, we will eventually move to only supporting formal snapshots. This PR introduces the capability to configure a node to generate and upload formal snapshots (state snapshots) without the need to also upload db checkpoints. We do this by generating a minimal db checkpoint config for use by `DBCheckpointHandler` and introducing a separate loop path in the handler, which simply marks new db checkpoints with `UPLOAD_COMPLETED` marker so that they can be used for formal snapshots and subsequently gc'ed. ## Test Plan Ran locally for 5 epochs with the following relevant config ``` state-snapshot-write-config: object-store-config: object-store: "File" directory: "/opt/sui/db/local_snapshots" concurrency: 5 ``` and with no db checkpoint config. Observed snapshots being geenerated: ``` williamsmith in /opt/sui/db/authorities_db/full_node_db/db_checkpoints λ ls epoch_4 williamsmith in /opt/sui/db/authorities_db/full_node_db/db_checkpoints λ cd ../snapshot williamsmith in /opt/sui/db/authorities_db/full_node_db/snapshot λ ls epoch_0 epoch_1 epoch_2 epoch_3 williamsmith in /opt/sui/db/authorities_db/full_node_db/snapshot λ cd ../.. williamsmith in /opt/sui/db/authorities_db λ cd ../local_snapshots williamsmith in /opt/sui/db/local_snapshots λ ls epoch_0 epoch_1 epoch_2 epoch_3 williamsmith in /opt/sui/db/local_snapshots λ ls epoch_3 1_1.obj 1_1.ref MANIFEST _SUCCESS ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] 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 ### Release notes
- Loading branch information
1 parent
12b10da
commit 5842bf2
Showing
3 changed files
with
146 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5842bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sui-typescript-docs – ./sdk/docs
sui-typescript-docs-mysten-labs.vercel.app
sui-typescript-docs.vercel.app
sui-typescript-docs-git-main-mysten-labs.vercel.app
sui-wallet-kit.vercel.app
5842bf2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sui-core – ./docs/site
sui-core.vercel.app
sui-core-sui-foundation.vercel.app
sui-core-git-main-sui-foundation.vercel.app
docs.sui.io
www.docs.sui.io