Skip to content

Commit

Permalink
fix review comment
Browse files Browse the repository at this point in the history
Signed-off-by: Wei Liu <[email protected]>
  • Loading branch information
weiliu1031 committed Jun 26, 2024
1 parent 49315d5 commit 6388d23
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/querycoordv2/task/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,14 @@ func (scheduler *taskScheduler) updateTaskDelta(task Task) {
var deltaMap map[int64]map[int64]int
switch task := task.(type) {
case *SegmentTask:
segment := scheduler.targetMgr.GetSealedSegment(task.CollectionID(), task.SegmentID(), meta.NextTargetFirst)
delta = int(segment.GetNumOfRows())
// skip growing segment's count, cause doesn't know realtime row number of growing segment
if task.Actions()[0].(*SegmentAction).Scope() == querypb.DataScope_Historical {
segment := scheduler.targetMgr.GetSealedSegment(task.CollectionID(), task.SegmentID(), meta.NextTargetFirst)
if segment != nil {
delta = int(segment.GetNumOfRows())
}
}

deltaMap = scheduler.segmentExecutingTaskDelta

case *ChannelTask:
Expand Down

0 comments on commit 6388d23

Please sign in to comment.