etcd-io / etcd

Distributed reliable key-value store for the most critical data of a distributed system
https://etcd.io
Apache License 2.0
46.92k stars 9.66k forks source link

Add e2e tests to verify snapshot data compatibility in a mixed version cluster #17752

Open siyuanfoundation opened 3 months ago

siyuanfoundation commented 3 months ago

What would you like to be added?

e2e tests that verify in a mixed version cluster (3.5+3.4, and 3.6+3.5), when a snapshot is sent from the higher version leader to the lower version follower, the snapshot file is properly migrated and compatible to the lower version.

To achieve this, the following tasks need to be done:

Why is this needed?

During implementing 3.5->3.4 downgrade, we caught an issue that could be easily slipped in downgrade designs: when a lower version follower receives a snapshot from a higher version leader, the snapshot might not be conformant to the lower version schema. In addition to offline data migration during downgrade process, special attention needs to paid to cover online migration as well.

This is important to guarantee data integrity and compatibility in a mixed version cluster. It is important not just to add the online migration, also to add proper tests to make sure of that.

siyuanfoundation commented 3 months ago

cc @serathius