mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 20:09:57 +08:00
[skip ci] Add comment for exported items (#12126)
Signed-off-by: shaoyue.chen <shaoyue.chen@zilliz.com>
This commit is contained in:
parent
8362155bf5
commit
6777d24c65
@ -11,6 +11,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// Handler handles some channel method for ChannelManager
|
||||
type Handler interface {
|
||||
GetVChanPositions(channel string, collectionID UniqueID, partitionID UniqueID) *datapb.VchannelInfo
|
||||
CheckShouldDropChannel(channel string) bool
|
||||
|
@ -429,10 +429,12 @@ func AverageReassignPolicy(store ROChannelStore, reassigns []*NodeChannelInfo) C
|
||||
// ChannelBGChecker check nodes' channels and return the channels needed to be reallocated.
|
||||
type ChannelBGChecker func(channels []*NodeChannelInfo, ts time.Time) ([]*NodeChannelInfo, error)
|
||||
|
||||
// EmptyBgChecker does nothing
|
||||
func EmptyBgChecker(channels []*NodeChannelInfo, ts time.Time) ([]*NodeChannelInfo, error) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// BgCheckWithMaxWatchDuration returns a ChannelBGChecker with the maxWatchDuration
|
||||
func BgCheckWithMaxWatchDuration(kv kv.TxnKV) ChannelBGChecker {
|
||||
return func(channels []*NodeChannelInfo, ts time.Time) ([]*NodeChannelInfo, error) {
|
||||
reallocations := make([]*NodeChannelInfo, 0, len(channels))
|
||||
|
@ -747,6 +747,7 @@ func (s *Server) GetCompactionState(ctx context.Context, req *milvuspb.GetCompac
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
// GetCompactionStateWithPlans returns the compaction state of given plan
|
||||
func (s *Server) GetCompactionStateWithPlans(ctx context.Context, req *milvuspb.GetCompactionPlansRequest) (*milvuspb.GetCompactionPlansResponse, error) {
|
||||
log.Debug("received GetCompactionStateWithPlans request", zap.Int64("compactionID", req.GetCompactionID()))
|
||||
|
||||
@ -815,6 +816,7 @@ func getCompactionState(tasks []*compactionTask) (state commonpb.CompactionState
|
||||
return
|
||||
}
|
||||
|
||||
// WatchChannels starts watch channels by give request
|
||||
func (s *Server) WatchChannels(ctx context.Context, req *datapb.WatchChannelsRequest) (*datapb.WatchChannelsResponse, error) {
|
||||
log.Debug("receive watch channels request", zap.Any("channels", req.GetChannelNames()))
|
||||
resp := &datapb.WatchChannelsResponse{
|
||||
|
Loading…
Reference in New Issue
Block a user