Skip to content

Bootstrap etcdserver from v3store (consistent_index) #20187

@ahrtr

Description

@ahrtr

What would you like to be added?

We have already deprecated v2store, and v3store is the solely source of truth for all data, including membership data in 3.6.0. But etcdserver still bootstrap from v2store, the latest v2 snapshot file. It will replay all WAL records starting from the latest snapshot index.

It doesn't make sense. We should bootstrap etcdserver from v3store, and replay WAL records start from the consistent_index.

It's the last blocker to completely get rid of the v2store.

Previous draft #17022

One problem is that etcdserver won't load any v2 snapshot on bootstrap anymore, accordingly it won't try to load any previous v3 snapshot which wasn't applied due to crash. two solutions:

  • don't fix it, the leader will send a new snapshot. It means waste of bandwidth
  • [preferred] still load valid snapshot entries from WAL, and if consistend-index < snapshot.index, try to load the v3 snapshot

The second one is still preferred, but depending on the complexity. If it greatly complicates the implementation, we might don't fix it. Will resolve this in the next step.

Why is this needed?

to completely get rid of v2store

Tasks/PRs in v3.7

Tasks planned in v3.8

  • Do not generate v2 snapshot files anymore
  • Remove flag --max-snapshots
  • Remove flag --v2-deprecation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions