etcd-io/etcd

RFC: StoreV2 deprecation plan

Open

#12.913 aperta il 30 apr 2021

Vedi su GitHub
 (32 commenti) (4 reazioni) (0 assegnatari)Go (10.352 fork)batch import
help wantedpriority/important-soonstage/tracked

Metriche repository

Star
 (51.701 star)
Metriche merge PR
 (Merge medio 6g 3h) (71 PR mergiate in 30 g)

Descrizione

[The content of this post is being edited, and is not yet approved plan of record ]

Background

In 3.4 storeV2 is still extensively used:

  • User can opt in --enable-v2 to unable V2 API that writes solely data to storeV2 files.

  • Membership information is both stored in V2 & V3 (backend) stores

  • Membership information is being read (recovered) from storeV2

  • Publishing membership happens through StoreV2 raft operation.

    • The new ClusterMemberAttrSet applier was implemented in etcd 3.5 so cannot be used by default in 3.5: to allow 3.4->3.5 rollback.
  • During startup etcd assumes each WAL log snapshot is accompanied by storev2 snapshot.

  • Note: etcdctl snapshot restore is not restoring V2 content (producing fake storeV2 with membership information)

Plan:

3.5 release (updated by ahrtr )

Both V2 and V3 state are supported, but V3 becomes the source of truth. TODO:

3.6 release (updated by serathius@, ahrtr )

V3 is the only meaningful state. V2 state is generated from V3 state to maintained backward compability. TODO:

3.7 release (updated by serathius@, ahrtr )

  • V2 code is totally removed. TODO:
    • Discovery v2 is removed
    • client v2 is removed
    • All V2 store code is removed
    • Only load data (i.e. members) from v3store (bbolt)
    • Validate membership applying using v3store
  • Do not generate v2 snapshot files at all
  • Bootstrap etcdserver from v3store(bbolt) instead of v2 snapshot: https://github.com/etcd-io/etcd/issues/20187
  • Change the default value for --v2-deprecation to V2Depr1WriteOnlyDrop
  • rewrite TestV2DeprecationWriteOnlyWAL and TestV2DeprecationWriteOnlySnapshot, refer to https://github.com/etcd-io/etcd/pull/19961

3.8 release

Remove --v2-deprecation. Completely cleanup anything related to v2store.

Docs

Guida contributor