mirror of https://github.com/milvus-io/milvus.git
Remove collection check when saving binlog (#6658)
Signed-off-by: sunby <bingyi.sun@zilliz.com>pull/6783/head
parent
2821c08560
commit
63387c83ef
|
@ -295,14 +295,6 @@ func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPath
|
|||
zap.Int64("segmentID", req.GetSegmentID()),
|
||||
zap.Any("checkpoints", req.GetCheckPoints()))
|
||||
|
||||
// check segment id & collection id matched
|
||||
if coll := s.meta.GetCollection(req.GetCollectionID()); coll == nil {
|
||||
errMsg := fmt.Sprintf("Failed to get collection info %d", req.GetCollectionID())
|
||||
log.Error(errMsg)
|
||||
resp.Reason = errMsg
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
binlogs, err := s.prepareBinlog(req)
|
||||
if err != nil {
|
||||
log.Error("Prepare binlog meta failed", zap.Error(err))
|
||||
|
|
|
@ -450,21 +450,6 @@ func TestSaveBinlogPaths(t *testing.T) {
|
|||
assert.EqualValues(t, segmentInfo.DmlPosition.MsgID, []byte{1, 2, 3})
|
||||
assert.EqualValues(t, segmentInfo.NumOfRows, 10)
|
||||
})
|
||||
t.Run("Abnormal SaveRequest", func(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
resp, err := svr.SaveBinlogPaths(ctx, &datapb.SaveBinlogPathsRequest{
|
||||
SegmentID: 10,
|
||||
CollectionID: 5,
|
||||
Field2BinlogPaths: []*datapb.ID2PathList{
|
||||
{
|
||||
ID: 1,
|
||||
Paths: []string{"/by-dev/test/0/1/2/1/Allo1", "/by-dev/test/0/1/2/1/Allo2"},
|
||||
},
|
||||
},
|
||||
})
|
||||
assert.Nil(t, err)
|
||||
assert.EqualValues(t, resp.ErrorCode, commonpb.ErrorCode_UnexpectedError)
|
||||
})
|
||||
}
|
||||
|
||||
func TestDataNodeTtChannel(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue