server/storage: address golangci var-naming issues

Signed-off-by: Ivan Valdes <ivan@vald.es>
This commit is contained in:
Ivan Valdes
2024-03-27 10:12:42 -07:00
parent 647b7eb8f6
commit d43738a49b
10 changed files with 30 additions and 13 deletions

View File

@ -109,13 +109,22 @@ func CreateConfigChangeEnts(lg *zap.Logger, ids []uint64, self uint64, term, ind
return ents
}
// GetEffectiveNodeIDsFromWalEntries returns an ordered set of IDs included in the given snapshot and
// GetEffectiveNodeIdsFromWalEntries returns an ordered set of IDs included in the given snapshot and
// the entries.
// Deprecated: use GetEffectiveNodeIDsFromWALEntries instead.
//
//revive:disable-next-line:var-naming
func GetEffectiveNodeIdsFromWalEntries(lg *zap.Logger, snap *raftpb.Snapshot, ents []raftpb.Entry) []uint64 {
return GetEffectiveNodeIDsFromWALEntries(lg, snap, ents)
}
// GetEffectiveNodeIDsFromWALEntries returns an ordered set of IDs included in the given snapshot and
// the entries. The given snapshot/entries can contain three kinds of
// ID-related entry:
// - ConfChangeAddNode, in which case the contained ID will Be added into the set.
// - ConfChangeRemoveNode, in which case the contained ID will Be removed from the set.
// - ConfChangeAddLearnerNode, in which the contained ID will Be added into the set.
func GetEffectiveNodeIDsFromWalEntries(lg *zap.Logger, snap *raftpb.Snapshot, ents []raftpb.Entry) []uint64 {
func GetEffectiveNodeIDsFromWALEntries(lg *zap.Logger, snap *raftpb.Snapshot, ents []raftpb.Entry) []uint64 {
ids := make(map[uint64]bool)
if snap != nil {
for _, id := range snap.Metadata.ConfState.Voters {