[skip e2e] Refine datacoord policy comment (#13794)

Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
pull/13806/head
edward.zeng 2021-12-20 19:46:59 +08:00 committed by GitHub
parent 43e535f3e8
commit 1848dae589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -29,15 +29,15 @@ import (
"stathat.com/c/consistent" "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 type RegisterPolicy func(store ROChannelStore, nodeID int64) ChannelOpSet
// EmptyRegister do nothing // EmptyRegister does nothing
func EmptyRegister(store ROChannelStore, nodeID int64) ChannelOpSet { func EmptyRegister(store ROChannelStore, nodeID int64) ChannelOpSet {
return nil 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 { func BufferChannelAssignPolicy(store ROChannelStore, nodeID int64) ChannelOpSet {
info := store.GetBufferChannelInfo() info := store.GetBufferChannelInfo()
if info == nil || len(info.Channels) == 0 { if info == nil || len(info.Channels) == 0 {
@ -50,7 +50,7 @@ func BufferChannelAssignPolicy(store ROChannelStore, nodeID int64) ChannelOpSet
return opSet 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 { func AvgAssignRegisterPolicy(store ROChannelStore, nodeID int64) ChannelOpSet {
opSet := BufferChannelAssignPolicy(store, nodeID) opSet := BufferChannelAssignPolicy(store, nodeID)
if len(opSet) != 0 { if len(opSet) != 0 {