Skip to content

Conversation

@karalabe
Copy link
Member

The new snap sync algo reuses the snapshot namespace instead of wiping and regenerating at the end. This means we need to disable snapshots from being used during sync. This disabling needs to survive restarts too.

A previous attempt tried to just nuke the journal, but that didn't really do anything as the existing snapshot was already live and used and a restart just considered everything missing and started a regeneration cycle from scratch, deleting the valuable partial data.

This PR solves it by adding a new marker to the database to track disabled snapshots, and on top it also aborts any active generation on demand and marks all existing layers stale so any accidental live use gets gracefully stopped too.

@karalabe karalabe added this to the 1.10.3 milestone Apr 29, 2021
Copy link
Member

@rjl493456442 rjl493456442 left a comment

Choose a reason for hiding this comment

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

nitpicks, otherwise lgtm.

But let's do a few sync before merging it

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