query_node.go 14.7 KB
Newer Older
1
package querynode
B
bigsheeper 已提交
2

3 4
/*

5
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
6

G
GuoRentong 已提交
7
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
8

F
FluorineDog 已提交
9 10
#include "segcore/collection_c.h"
#include "segcore/segment_c.h"
11 12

*/
B
bigsheeper 已提交
13
import "C"
14

B
bigsheeper 已提交
15
import (
16
	"context"
17
	"fmt"
S
sunby 已提交
18
	"math/rand"
X
Xiangyu Wang 已提交
19
	"strings"
C
cai.zhang 已提交
20
	"sync/atomic"
S
sunby 已提交
21
	"time"
22

T
ThreadDao 已提交
23 24
	"github.com/zilliztech/milvus-distributed/internal/types"

S
sunby 已提交
25 26
	"errors"

B
bigsheeper 已提交
27 28 29
	"go.uber.org/zap"

	"github.com/zilliztech/milvus-distributed/internal/log"
G
groot 已提交
30
	"github.com/zilliztech/milvus-distributed/internal/msgstream"
X
Xiangyu Wang 已提交
31
	"github.com/zilliztech/milvus-distributed/internal/msgstream/pulsarms"
G
groot 已提交
32
	"github.com/zilliztech/milvus-distributed/internal/msgstream/rmqms"
33
	"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
C
cai.zhang 已提交
34
	"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
35
	queryPb "github.com/zilliztech/milvus-distributed/internal/proto/querypb"
36
	"github.com/zilliztech/milvus-distributed/internal/util/typeutil"
B
bigsheeper 已提交
37 38 39
)

type QueryNode struct {
40 41
	typeutil.Service

X
XuanYang-cn 已提交
42
	queryNodeLoopCtx    context.Context
43
	queryNodeLoopCancel context.CancelFunc
44

45
	QueryNodeID UniqueID
C
cai.zhang 已提交
46
	stateCode   atomic.Value
B
bigsheeper 已提交
47

48
	replica ReplicaInterface
B
bigsheeper 已提交
49

50
	// internal services
51 52 53 54 55
	dataSyncService *dataSyncService
	metaService     *metaService
	searchService   *searchService
	loadService     *loadService
	statsService    *statsService
56

57
	// clients
T
ThreadDao 已提交
58 59 60 61
	masterService types.MasterService
	queryService  types.QueryService
	indexService  types.IndexService
	dataService   types.DataService
G
groot 已提交
62 63

	msFactory msgstream.Factory
B
bigsheeper 已提交
64
}
65

66
func NewQueryNode(ctx context.Context, queryNodeID UniqueID, factory msgstream.Factory) *QueryNode {
S
sunby 已提交
67
	rand.Seed(time.Now().UnixNano())
X
XuanYang-cn 已提交
68
	ctx1, cancel := context.WithCancel(ctx)
C
cai.zhang 已提交
69
	node := &QueryNode{
70 71 72 73 74 75 76 77
		queryNodeLoopCtx:    ctx1,
		queryNodeLoopCancel: cancel,
		QueryNodeID:         queryNodeID,

		dataSyncService: nil,
		metaService:     nil,
		searchService:   nil,
		statsService:    nil,
G
groot 已提交
78 79

		msFactory: factory,
80 81
	}

82
	node.replica = newCollectionReplica()
D
del-zhenwu 已提交
83
	node.UpdateStateCode(internalpb2.StateCode_Abnormal)
C
cai.zhang 已提交
84 85
	return node
}
G
godchen 已提交
86

G
groot 已提交
87
func NewQueryNodeWithoutID(ctx context.Context, factory msgstream.Factory) *QueryNode {
88 89 90 91 92 93 94 95 96
	ctx1, cancel := context.WithCancel(ctx)
	node := &QueryNode{
		queryNodeLoopCtx:    ctx1,
		queryNodeLoopCancel: cancel,

		dataSyncService: nil,
		metaService:     nil,
		searchService:   nil,
		statsService:    nil,
G
groot 已提交
97 98

		msFactory: factory,
99 100
	}

101
	node.replica = newCollectionReplica()
D
del-zhenwu 已提交
102
	node.UpdateStateCode(internalpb2.StateCode_Abnormal)
103

104
	return node
B
bigsheeper 已提交
105 106
}

N
neza2017 已提交
107
func (node *QueryNode) Init() error {
G
godchen 已提交
108
	ctx := context.Background()
X
xige-16 已提交
109
	registerReq := &queryPb.RegisterNodeRequest{
110 111 112
		Base: &commonpb.MsgBase{
			SourceID: Params.QueryNodeID,
		},
C
cai.zhang 已提交
113 114 115 116 117
		Address: &commonpb.Address{
			Ip:   Params.QueryNodeIP,
			Port: Params.QueryNodePort,
		},
	}
118

T
ThreadDao 已提交
119
	resp, err := node.queryService.RegisterNode(ctx, registerReq)
C
cai.zhang 已提交
120 121 122
	if err != nil {
		panic(err)
	}
123
	if resp.Status.ErrorCode != commonpb.ErrorCode_Success {
124 125 126 127 128 129 130 131 132 133 134 135 136 137
		panic(resp.Status.Reason)
	}

	for _, kv := range resp.InitParams.StartParams {
		switch kv.Key {
		case "StatsChannelName":
			Params.StatsChannelName = kv.Value
		case "TimeTickChannelName":
			Params.QueryTimeTickChannelName = kv.Value
		case "QueryChannelName":
			Params.SearchChannelNames = append(Params.SearchChannelNames, kv.Value)
		case "QueryResultChannelName":
			Params.SearchResultChannelNames = append(Params.SearchResultChannelNames, kv.Value)
		default:
S
sunby 已提交
138
			return fmt.Errorf("Invalid key: %v", kv.Key)
139
		}
C
cai.zhang 已提交
140 141
	}

B
bigsheeper 已提交
142
	log.Debug("", zap.Int64("QueryNodeID", Params.QueryNodeID))
C
cai.zhang 已提交
143

T
ThreadDao 已提交
144
	if node.masterService == nil {
B
bigsheeper 已提交
145
		log.Error("null master service detected")
146 147
	}

T
ThreadDao 已提交
148
	if node.indexService == nil {
B
bigsheeper 已提交
149
		log.Error("null index service detected")
150 151
	}

T
ThreadDao 已提交
152
	if node.dataService == nil {
B
bigsheeper 已提交
153
		log.Error("null data service detected")
154 155
	}

156 157 158 159
	return nil
}

func (node *QueryNode) Start() error {
G
groot 已提交
160 161 162 163 164 165 166 167 168 169
	var err error
	m := map[string]interface{}{
		"PulsarAddress":  Params.PulsarAddress,
		"ReceiveBufSize": 1024,
		"PulsarBufSize":  1024}
	err = node.msFactory.SetParams(m)
	if err != nil {
		return err
	}

X
XuanYang-cn 已提交
170
	// init services and manager
G
groot 已提交
171 172
	node.dataSyncService = newDataSyncService(node.queryNodeLoopCtx, node.replica, node.msFactory)
	node.searchService = newSearchService(node.queryNodeLoopCtx, node.replica, node.msFactory)
B
bigsheeper 已提交
173
	//node.metaService = newMetaService(node.queryNodeLoopCtx, node.replica)
G
groot 已提交
174

T
ThreadDao 已提交
175
	node.loadService = newLoadService(node.queryNodeLoopCtx, node.masterService, node.dataService, node.indexService, node.replica, node.dataSyncService.dmStream)
G
groot 已提交
176
	node.statsService = newStatsService(node.queryNodeLoopCtx, node.replica, node.loadService.segLoader.indexLoader.fieldStatsChan, node.msFactory)
B
bigsheeper 已提交
177

X
XuanYang-cn 已提交
178
	// start services
179
	go node.dataSyncService.start()
N
neza2017 已提交
180
	go node.searchService.start()
B
bigsheeper 已提交
181
	//go node.metaService.start()
182
	go node.loadService.start()
X
XuanYang-cn 已提交
183
	go node.statsService.start()
D
del-zhenwu 已提交
184
	node.UpdateStateCode(internalpb2.StateCode_Healthy)
N
neza2017 已提交
185
	return nil
B
bigsheeper 已提交
186
}
B
bigsheeper 已提交
187

N
neza2017 已提交
188
func (node *QueryNode) Stop() error {
D
del-zhenwu 已提交
189
	node.UpdateStateCode(internalpb2.StateCode_Abnormal)
X
XuanYang-cn 已提交
190 191
	node.queryNodeLoopCancel()

B
bigsheeper 已提交
192
	// free collectionReplica
X
XuanYang-cn 已提交
193
	node.replica.freeAll()
B
bigsheeper 已提交
194 195 196

	// close services
	if node.dataSyncService != nil {
X
XuanYang-cn 已提交
197
		node.dataSyncService.close()
B
bigsheeper 已提交
198 199
	}
	if node.searchService != nil {
X
XuanYang-cn 已提交
200
		node.searchService.close()
B
bigsheeper 已提交
201
	}
202 203
	if node.loadService != nil {
		node.loadService.close()
B
bigsheeper 已提交
204
	}
B
bigsheeper 已提交
205
	if node.statsService != nil {
X
XuanYang-cn 已提交
206
		node.statsService.close()
B
bigsheeper 已提交
207
	}
N
neza2017 已提交
208
	return nil
X
XuanYang-cn 已提交
209 210
}

211 212 213 214
func (node *QueryNode) UpdateStateCode(code internalpb2.StateCode) {
	node.stateCode.Store(code)
}

T
ThreadDao 已提交
215
func (node *QueryNode) SetMasterService(master types.MasterService) error {
B
bigsheeper 已提交
216 217 218
	if master == nil {
		return errors.New("null master service interface")
	}
T
ThreadDao 已提交
219
	node.masterService = master
B
bigsheeper 已提交
220 221 222
	return nil
}

T
ThreadDao 已提交
223
func (node *QueryNode) SetQueryService(query types.QueryService) error {
224
	if query == nil {
B
bigsheeper 已提交
225
		return errors.New("null query service interface")
226
	}
T
ThreadDao 已提交
227
	node.queryService = query
228 229 230
	return nil
}

T
ThreadDao 已提交
231
func (node *QueryNode) SetIndexService(index types.IndexService) error {
232 233 234
	if index == nil {
		return errors.New("null index service interface")
	}
T
ThreadDao 已提交
235
	node.indexService = index
236 237 238
	return nil
}

T
ThreadDao 已提交
239
func (node *QueryNode) SetDataService(data types.DataService) error {
240 241 242
	if data == nil {
		return errors.New("null data service interface")
	}
T
ThreadDao 已提交
243
	node.dataService = data
244 245 246
	return nil
}

C
cai.zhang 已提交
247
func (node *QueryNode) GetComponentStates() (*internalpb2.ComponentStates, error) {
248 249
	stats := &internalpb2.ComponentStates{
		Status: &commonpb.Status{
250
			ErrorCode: commonpb.ErrorCode_Success,
251 252
		},
	}
C
cai.zhang 已提交
253 254
	code, ok := node.stateCode.Load().(internalpb2.StateCode)
	if !ok {
255 256
		errMsg := "unexpected error in type assertion"
		stats.Status = &commonpb.Status{
257
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
258 259 260
			Reason:    errMsg,
		}
		return stats, errors.New(errMsg)
C
cai.zhang 已提交
261 262 263
	}
	info := &internalpb2.ComponentInfo{
		NodeID:    Params.QueryNodeID,
X
XuanYang-cn 已提交
264
		Role:      typeutil.QueryNodeRole,
C
cai.zhang 已提交
265 266
		StateCode: code,
	}
267
	stats.State = info
C
cai.zhang 已提交
268 269 270 271
	return stats, nil
}

func (node *QueryNode) GetTimeTickChannel() (string, error) {
N
neza2017 已提交
272
	return Params.QueryTimeTickChannelName, nil
C
cai.zhang 已提交
273 274 275 276 277 278
}

func (node *QueryNode) GetStatisticsChannel() (string, error) {
	return Params.StatsChannelName, nil
}

X
XuanYang-cn 已提交
279 280 281 282
func (node *QueryNode) AddQueryChannel(in *queryPb.AddQueryChannelsRequest) (*commonpb.Status, error) {
	if node.searchService == nil || node.searchService.searchMsgStream == nil {
		errMsg := "null search service or null search message stream"
		status := &commonpb.Status{
283
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
284 285 286 287 288 289 290 291 292
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

	// add request channel
	consumeChannels := []string{in.RequestChannelID}
	consumeSubName := Params.MsgChannelSubName
X
xige-16 已提交
293
	node.searchService.searchMsgStream.AsConsumer(consumeChannels, consumeSubName)
X
Xiangyu Wang 已提交
294
	log.Debug("querynode AsConsumer: " + strings.Join(consumeChannels, ", ") + " : " + consumeSubName)
X
XuanYang-cn 已提交
295 296 297

	// add result channel
	producerChannels := []string{in.ResultChannelID}
X
xige-16 已提交
298
	node.searchService.searchResultMsgStream.AsProducer(producerChannels)
X
Xiangyu Wang 已提交
299
	log.Debug("querynode AsProducer: " + strings.Join(producerChannels, ", "))
X
XuanYang-cn 已提交
300 301

	status := &commonpb.Status{
302
		ErrorCode: commonpb.ErrorCode_Success,
X
XuanYang-cn 已提交
303 304 305 306 307 308 309 310
	}
	return status, nil
}

func (node *QueryNode) RemoveQueryChannel(in *queryPb.RemoveQueryChannelsRequest) (*commonpb.Status, error) {
	if node.searchService == nil || node.searchService.searchMsgStream == nil {
		errMsg := "null search service or null search result message stream"
		status := &commonpb.Status{
311
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
312 313 314 315 316 317
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

X
Xiangyu Wang 已提交
318
	searchStream, ok := node.searchService.searchMsgStream.(*pulsarms.PulsarMsgStream)
X
XuanYang-cn 已提交
319 320 321
	if !ok {
		errMsg := "type assertion failed for search message stream"
		status := &commonpb.Status{
322
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
323 324 325 326 327 328
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

X
Xiangyu Wang 已提交
329
	resultStream, ok := node.searchService.searchResultMsgStream.(*pulsarms.PulsarMsgStream)
X
XuanYang-cn 已提交
330 331 332
	if !ok {
		errMsg := "type assertion failed for search result message stream"
		status := &commonpb.Status{
333
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
334 335 336 337 338 339 340 341 342 343
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

	// remove request channel
	consumeChannels := []string{in.RequestChannelID}
	consumeSubName := Params.MsgChannelSubName
	// TODO: searchStream.RemovePulsarConsumers(producerChannels)
Z
zhenshan.cao 已提交
344
	searchStream.AsConsumer(consumeChannels, consumeSubName)
X
XuanYang-cn 已提交
345 346 347 348

	// remove result channel
	producerChannels := []string{in.ResultChannelID}
	// TODO: resultStream.RemovePulsarProducer(producerChannels)
Z
zhenshan.cao 已提交
349
	resultStream.AsProducer(producerChannels)
X
XuanYang-cn 已提交
350 351

	status := &commonpb.Status{
352
		ErrorCode: commonpb.ErrorCode_Success,
X
XuanYang-cn 已提交
353 354 355 356 357 358 359 360
	}
	return status, nil
}

func (node *QueryNode) WatchDmChannels(in *queryPb.WatchDmChannelsRequest) (*commonpb.Status, error) {
	if node.dataSyncService == nil || node.dataSyncService.dmStream == nil {
		errMsg := "null data sync service or null data manipulation stream"
		status := &commonpb.Status{
361
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
362 363 364 365 366 367
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

G
groot 已提交
368 369 370 371 372
	switch t := node.dataSyncService.dmStream.(type) {
	case *pulsarms.PulsarTtMsgStream:
	case *rmqms.RmqTtMsgStream:
	default:
		_ = t
X
XuanYang-cn 已提交
373 374
		errMsg := "type assertion failed for dm message stream"
		status := &commonpb.Status{
375
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
X
XuanYang-cn 已提交
376 377 378 379 380 381 382 383 384
			Reason:    errMsg,
		}

		return status, errors.New(errMsg)
	}

	// add request channel
	consumeChannels := in.ChannelIDs
	consumeSubName := Params.MsgChannelSubName
G
groot 已提交
385
	node.dataSyncService.dmStream.AsConsumer(consumeChannels, consumeSubName)
X
Xiangyu Wang 已提交
386
	log.Debug("querynode AsConsumer: " + strings.Join(consumeChannels, ", ") + " : " + consumeSubName)
X
XuanYang-cn 已提交
387 388

	status := &commonpb.Status{
389
		ErrorCode: commonpb.ErrorCode_Success,
X
XuanYang-cn 已提交
390 391 392 393 394 395
	}
	return status, nil
}

func (node *QueryNode) LoadSegments(in *queryPb.LoadSegmentRequest) (*commonpb.Status, error) {
	// TODO: support db
Z
zhenshan.cao 已提交
396
	collectionID := in.CollectionID
C
cai.zhang 已提交
397 398
	partitionID := in.PartitionID
	segmentIDs := in.SegmentIDs
X
XuanYang-cn 已提交
399
	fieldIDs := in.FieldIDs
400
	schema := in.Schema
401

B
bigsheeper 已提交
402
	log.Debug("query node load segment", zap.String("loadSegmentRequest", fmt.Sprintln(in)))
X
xige-16 已提交
403 404

	status := &commonpb.Status{
405
		ErrorCode: commonpb.ErrorCode_Success,
X
xige-16 已提交
406
	}
407 408 409 410 411
	hasCollection := node.replica.hasCollection(collectionID)
	hasPartition := node.replica.hasPartition(partitionID)
	if !hasCollection {
		err := node.replica.addCollection(collectionID, schema)
		if err != nil {
412
			status.ErrorCode = commonpb.ErrorCode_UnexpectedError
X
xige-16 已提交
413
			status.Reason = err.Error()
414 415 416 417 418 419
			return status, err
		}
	}
	if !hasPartition {
		err := node.replica.addPartition(collectionID, partitionID)
		if err != nil {
420
			status.ErrorCode = commonpb.ErrorCode_UnexpectedError
X
xige-16 已提交
421
			status.Reason = err.Error()
422 423 424
			return status, err
		}
	}
425
	err := node.replica.enablePartition(partitionID)
C
cai.zhang 已提交
426
	if err != nil {
427
		status.ErrorCode = commonpb.ErrorCode_UnexpectedError
X
xige-16 已提交
428 429 430 431 432 433 434 435 436 437
		status.Reason = err.Error()
		return status, err
	}

	if len(segmentIDs) == 0 {
		return status, nil
	}

	if len(in.SegmentIDs) != len(in.SegmentStates) {
		err := errors.New("len(segmentIDs) should equal to len(segmentStates)")
438
		status.ErrorCode = commonpb.ErrorCode_UnexpectedError
X
xige-16 已提交
439
		status.Reason = err.Error()
C
cai.zhang 已提交
440 441 442
		return status, err
	}

443
	// segments are ordered before LoadSegments calling
444
	//var position *internalpb2.MsgPosition = nil
445
	for i, state := range in.SegmentStates {
446
		//thisPosition := state.StartPosition
T
ThreadDao 已提交
447
		if state.State <= commonpb.SegmentState_Growing {
448 449 450 451 452
			//if position == nil {
			//	position = &internalpb2.MsgPosition{
			//		ChannelName: thisPosition.ChannelName,
			//	}
			//}
453 454
			segmentIDs = segmentIDs[:i]
			break
C
cai.zhang 已提交
455
		}
456
		//position = state.StartPosition
457 458
	}

459 460 461 462 463 464 465 466
	//err = node.dataSyncService.seekSegment(position)
	//if err != nil {
	//	status := &commonpb.Status{
	//		ErrorCode: commonpb.ErrorCode_UnexpectedError,
	//		Reason:    err.Error(),
	//	}
	//	return status, err
	//}
X
xige-16 已提交
467 468 469

	err = node.loadService.loadSegment(collectionID, partitionID, segmentIDs, fieldIDs)
	if err != nil {
470
		status.ErrorCode = commonpb.ErrorCode_UnexpectedError
X
xige-16 已提交
471 472 473 474
		status.Reason = err.Error()
		return status, err
	}
	return status, nil
C
cai.zhang 已提交
475 476
}

B
bigsheeper 已提交
477 478 479 480
func (node *QueryNode) ReleaseCollection(in *queryPb.ReleaseCollectionRequest) (*commonpb.Status, error) {
	err := node.replica.removeCollection(in.CollectionID)
	if err != nil {
		status := &commonpb.Status{
481
			ErrorCode: commonpb.ErrorCode_UnexpectedError,
B
bigsheeper 已提交
482 483 484 485 486 487
			Reason:    err.Error(),
		}
		return status, err
	}

	return &commonpb.Status{
488
		ErrorCode: commonpb.ErrorCode_Success,
B
bigsheeper 已提交
489 490 491 492 493
	}, nil
}

func (node *QueryNode) ReleasePartitions(in *queryPb.ReleasePartitionRequest) (*commonpb.Status, error) {
	status := &commonpb.Status{
494
		ErrorCode: commonpb.ErrorCode_Success,
B
bigsheeper 已提交
495
	}
C
cai.zhang 已提交
496
	for _, id := range in.PartitionIDs {
B
bigsheeper 已提交
497
		err := node.loadService.segLoader.replica.removePartition(id)
C
cai.zhang 已提交
498
		if err != nil {
B
bigsheeper 已提交
499
			// not return, try to release all partitions
500
			status.ErrorCode = commonpb.ErrorCode_UnexpectedError
B
bigsheeper 已提交
501
			status.Reason = err.Error()
C
cai.zhang 已提交
502 503
		}
	}
B
bigsheeper 已提交
504 505
	return status, nil
}
C
cai.zhang 已提交
506

B
bigsheeper 已提交
507 508
func (node *QueryNode) ReleaseSegments(in *queryPb.ReleaseSegmentRequest) (*commonpb.Status, error) {
	status := &commonpb.Status{
509
		ErrorCode: commonpb.ErrorCode_Success,
B
bigsheeper 已提交
510
	}
C
cai.zhang 已提交
511
	for _, id := range in.SegmentIDs {
B
bigsheeper 已提交
512 513 514
		err2 := node.loadService.segLoader.replica.removeSegment(id)
		if err2 != nil {
			// not return, try to release all segments
515
			status.ErrorCode = commonpb.ErrorCode_UnexpectedError
B
bigsheeper 已提交
516
			status.Reason = err2.Error()
X
XuanYang-cn 已提交
517 518
		}
	}
B
bigsheeper 已提交
519
	return status, nil
X
XuanYang-cn 已提交
520
}
B
bigsheeper 已提交
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541

func (node *QueryNode) GetSegmentInfo(in *queryPb.SegmentInfoRequest) (*queryPb.SegmentInfoResponse, error) {
	infos := make([]*queryPb.SegmentInfo, 0)
	for _, id := range in.SegmentIDs {
		segment, err := node.replica.getSegmentByID(id)
		if err != nil {
			continue
		}
		info := &queryPb.SegmentInfo{
			SegmentID:    segment.ID(),
			CollectionID: segment.collectionID,
			PartitionID:  segment.partitionID,
			MemSize:      segment.getMemSize(),
			NumRows:      segment.getRowCount(),
			IndexName:    segment.getIndexName(),
			IndexID:      segment.getIndexID(),
		}
		infos = append(infos, info)
	}
	return &queryPb.SegmentInfoResponse{
		Status: &commonpb.Status{
542
			ErrorCode: commonpb.ErrorCode_Success,
B
bigsheeper 已提交
543 544 545 546
		},
		Infos: infos,
	}, nil
}