Skip to content

Commit

Permalink
Merge pull request #19145 from ahrtr/mix_version_3.5_20250108
Browse files Browse the repository at this point in the history
[3.5] Fix mixVersion test case: ensure a snapshot to be sent out
  • Loading branch information
ahrtr authored Jan 8, 2025
2 parents 762e938 + c1ab521 commit 9d920a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/etcdserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ func NewServer(cfg config.ServerConfig) (srv *EtcdServer, err error) {
srv.kv = mvcc.New(srv.Logger(), srv.be, srv.lessor, mvccStoreConfig)

kvindex := ci.ConsistentIndex()
srv.lg.Debug("restore consistentIndex", zap.Uint64("index", kvindex))
srv.lg.Info("restore consistentIndex", zap.Uint64("index", kvindex))

if beExist {
// TODO: remove kvindex != 0 checking when we do not expect users to upgrade
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/etcd_mix_versions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ func mixVersionsSnapshotTestByMockPartition(t *testing.T, cfg e2e.EtcdProcessClu
require.NoError(t, err)
time.Sleep(2 * time.Second)

t.Log("Writing 20 keys to the cluster (more than SnapshotCount entries to trigger at least a snapshot)")
t.Log("Writing 30 keys to the cluster (more than SnapshotCount entries to trigger at least a snapshot)")
etcdctl := epc.Procs[0].Etcdctl(e2e.ClientNonTLS, false, false)
writeKVs(t, etcdctl, 0, 20)
writeKVs(t, etcdctl, 0, 30)

t.Log("Verify logs to check leader has saved snapshot")
leaderEPC := epc.Procs[epc.WaitLeader(t)]
Expand Down

0 comments on commit 9d920a8

Please sign in to comment.