From 1848dae589024df77690be76b7a2a90be7fe2fee Mon Sep 17 00:00:00 2001 From: "edward.zeng" Date: Mon, 20 Dec 2021 19:46:59 +0800 Subject: [PATCH] [skip e2e] Refine datacoord policy comment (#13794) Signed-off-by: Edward Zeng --- internal/datacoord/policy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/datacoord/policy.go b/internal/datacoord/policy.go index adeed9fe06..e4d8a47b9f 100644 --- a/internal/datacoord/policy.go +++ b/internal/datacoord/policy.go @@ -29,15 +29,15 @@ import ( "stathat.com/c/consistent" ) -// RegisterPolicy decide the channels mapping after registering the nodeID +// RegisterPolicy decides the channels mapping after registering the nodeID type RegisterPolicy func(store ROChannelStore, nodeID int64) ChannelOpSet -// EmptyRegister do nothing +// EmptyRegister does nothing func EmptyRegister(store ROChannelStore, nodeID int64) ChannelOpSet { return nil } -// BufferChannelAssignPolicy assign buffer channels to new registered node +// BufferChannelAssignPolicy assigns buffer channels to new registered node func BufferChannelAssignPolicy(store ROChannelStore, nodeID int64) ChannelOpSet { info := store.GetBufferChannelInfo() if info == nil || len(info.Channels) == 0 { @@ -50,7 +50,7 @@ func BufferChannelAssignPolicy(store ROChannelStore, nodeID int64) ChannelOpSet return opSet } -// AvgAssignRegisterPolicy assign channels with average to new registered node +// AvgAssignRegisterPolicy assigns channels with average to new registered node func AvgAssignRegisterPolicy(store ROChannelStore, nodeID int64) ChannelOpSet { opSet := BufferChannelAssignPolicy(store, nodeID) if len(opSet) != 0 {