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

Proposal for a snapshot scheduling API #131

Merged
merged 9 commits into from
Feb 2, 2023
Merged

Conversation

vladtr
Copy link
Contributor

@vladtr vladtr commented Jan 17, 2023

This PR contains proposal for a 3 new additions to a snapshot API that would allow:

  • schedule a new recurring snapshot task
  • retrieve all schedculed snapshot requests with associated pending snapshots
  • un-schedule snapshot task

Please refer to the following issue for additional details:
AntelopeIO/leap#396

api-http/proposals/snapshot-api.md Outdated Show resolved Hide resolved
![image](https://user-images.githubusercontent.com/79997103/212993725-debd027e-05d0-490b-bbe4-ee95e5d1820e.png)

### Retrieving Snapshot Status
Request takes snapshot_id as parameter and either returns object describing scheduled snapshot or an error
Copy link
Member

Choose a reason for hiding this comment

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

Can status show which ones are in progress, which ones are pending? For in progress, can the number of blocks being done shown?

Copy link
Member

Choose a reason for hiding this comment

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

A pending snapshot is one in progress. Do you see a distinction between the two?

Copy link
Member

Choose a reason for hiding this comment

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

OK, I see.

api-http/proposals/snapshot-api.md Show resolved Hide resolved
@arhag
Copy link
Member

arhag commented Jan 26, 2023

Changes to still make:

  • Remove pagination.
  • Remove snapshot_request_time.
  • Remove pending snapshots from JSON data model and instead figure out mapping on startup by enumerating pending snapshots in snapshot directory (following filename schema). Read snapshot to get block number and block ID (and verify with filename values) as well as head_block_time and snapshot version number.

@vladtr vladtr merged commit 46290d3 into main Feb 2, 2023
@vladtr vladtr deleted the snapshot-api-proposal branch February 2, 2023 19:31
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