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

Async snapshot generation and evidence #1510

Merged
merged 33 commits into from
Aug 19, 2020

Conversation

jumaffre
Copy link
Contributor

Resolves #1301

We now generate snapshots asynchronously on the primary, so that the consensus thread is not immediately blocked when a snapshot needs to be generated (note that with 0 worker thread, the snapshot is still generated/serialised on the consensus thread). The evidence of the snapshot (i.e. hash of serialised snapshot) is now also stored in a new ccf.snapshot_evidences table.

  • I've also separated the snapshot generation (cheap) from its serialisation (expensive) in the KV store. The snapshot is taken by the consensus thread at the time we snapshot but the serialisation only happens later, possibly on a different thread.
  • If there are multiple worker threads, we round-robin the generation of snapshots.

@jumaffre jumaffre requested a review from a team as a code owner August 19, 2020 10:29
@ghost
Copy link

ghost commented Aug 19, 2020

async_snapshot_generation@11756 aka 20200819.12 vs master ewma over 50 builds from 11354 to 11749
images

src/node/entities.h Outdated Show resolved Hide resolved
@jumaffre jumaffre merged commit ec9c3bd into microsoft:master Aug 19, 2020
achamayou pushed a commit to achamayou/CCF that referenced this pull request Aug 21, 2020
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.

Snapshots should be generated at regular interval
2 participants