server: Rename function to NewConfigChangeEntries indicating we are not reading it from wal

This commit is contained in:
Marek Siarkowicz 2021-08-05 11:53:47 +02:00
parent 4884e7d8cf
commit a450dc7f91

View File

@ -532,7 +532,7 @@ func bootstrapWALFromSnapshot(cfg config.ServerConfig, snapshot *raftpb.Snapshot
if cfg.ForceNewCluster { if cfg.ForceNewCluster {
// discard the previously uncommitted entries // discard the previously uncommitted entries
bwal.ents = bwal.CommitedEntries() bwal.ents = bwal.CommitedEntries()
entries := bwal.ConfigChangeEntries() entries := bwal.NewConfigChangeEntries()
// force commit config change entries // force commit config change entries
bwal.AppendAndCommitEntries(entries) bwal.AppendAndCommitEntries(entries)
cfg.Logger.Info( cfg.Logger.Info(
@ -657,7 +657,7 @@ func (wal *bootstrappedWAL) CommitedEntries() []raftpb.Entry {
return wal.ents return wal.ents
} }
func (wal *bootstrappedWAL) ConfigChangeEntries() []raftpb.Entry { func (wal *bootstrappedWAL) NewConfigChangeEntries() []raftpb.Entry {
return serverstorage.CreateConfigChangeEnts( return serverstorage.CreateConfigChangeEnts(
wal.lg, wal.lg,
serverstorage.GetIDs(wal.lg, wal.snapshot, wal.ents), serverstorage.GetIDs(wal.lg, wal.snapshot, wal.ents),