Skip to content

Commit

Permalink
refine_log_of_update_target_version (#27572)
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 authored Oct 10, 2023
1 parent 294ff74 commit 0695c88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions internal/querynodev2/delegator/distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ func (d *distribution) SyncTargetVersion(newVersion int64, growingInTarget []int
log.Info("Update readable segment version",
zap.Int64("oldVersion", oldValue),
zap.Int64("newVersion", newVersion),
zap.Int64s("growing", growingInTarget),
zap.Int64s("sealed", sealedInTarget),
zap.Int("growingSegmentNum", len(growingInTarget)),
zap.Int("sealedSegmentNum", len(sealedInTarget)),
)
}

Expand Down
9 changes: 4 additions & 5 deletions internal/querynodev2/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -1342,21 +1342,20 @@ func (node *QueryNode) SyncDistribution(ctx context.Context, req *querypb.SyncDi
addSegments := make(map[int64][]*querypb.SegmentLoadInfo)
for _, action := range req.GetActions() {
log := log.With(zap.String("Action",
action.GetType().String()),
zap.Int64("segmentID", action.SegmentID),
zap.Int64("TargetVersion", action.GetTargetVersion()),
)
log.Info("sync action")
action.GetType().String()))
switch action.GetType() {
case querypb.SyncType_Remove:
log.Info("sync action", zap.Int64("segmentID", action.SegmentID))
removeActions = append(removeActions, action)
case querypb.SyncType_Set:
log.Info("sync action", zap.Int64("segmentID", action.SegmentID))
if action.GetInfo() == nil {
log.Warn("sync request from legacy querycoord without load info, skip")
continue
}
addSegments[action.GetNodeID()] = append(addSegments[action.GetNodeID()], action.GetInfo())
case querypb.SyncType_UpdateVersion:
log.Info("sync action", zap.Int64("TargetVersion", action.GetTargetVersion()))
pipeline := node.pipelineManager.Get(req.GetChannel())
if pipeline != nil {
droppedInfos := lo.Map(action.GetDroppedInTarget(), func(id int64, _ int) *datapb.SegmentInfo {
Expand Down

0 comments on commit 0695c88

Please sign in to comment.