Skip to content

Commit

Permalink
Fix load segment request too large
Browse files Browse the repository at this point in the history
Signed-off-by: xige-16 <xi.ge@zilliz.com>
  • Loading branch information
xige-16 committed Oct 28, 2021
1 parent b5fc643 commit 6b0e202
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/querycoord/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ func assignInternalTask(ctx context.Context,
node2Segments[nodeID] = append(node2Segments[nodeID], loadSegmentRequests[index])
sizeCounts[nodeID] = sizeOfReq
} else {
if sizeCounts[nodeID]+sizeOfReq > 2097152 {
if sizeCounts[nodeID]+sizeOfReq > MaxSendSizeToEtcd {
node2Segments[nodeID] = append(node2Segments[nodeID], loadSegmentRequests[index])
sizeCounts[nodeID] = sizeOfReq
} else {
Expand Down
12 changes: 12 additions & 0 deletions internal/querycoord/task_scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,18 @@ func (scheduler *TaskScheduler) processTask(t task) error {
}
childTask.setTaskID(id)
childTaskKey := fmt.Sprintf("%s/%d", activeTaskPrefix, childTask.getTaskID())
var protoSize int
switch childTask.msgType() {
case commonpb.MsgType_LoadSegments:
protoSize = proto.Size(childTask.(*loadSegmentTask).LoadSegmentsRequest)
case commonpb.MsgType_WatchDmChannels:
protoSize = proto.Size(childTask.(*watchDmChannelTask).WatchDmChannelsRequest)
case commonpb.MsgType_WatchQueryChannels:
protoSize = proto.Size(childTask.(*watchQueryChannelTask).AddQueryChannelRequest)
default:
//TODO::
}
log.Debug("updateKVFn: the size of internal request", zap.Int("size", protoSize), zap.Int64("taskID", childTask.getTaskID()))
blobs, err := childTask.marshal()
if err != nil {
return err
Expand Down

0 comments on commit 6b0e202

Please sign in to comment.