Remove collection check when saving binlog (#6658)

Signed-off-by: sunby <bingyi.sun@zilliz.com>
pull/6783/head
sunby 2021-07-23 21:23:22 +08:00 committed by GitHub
parent 2821c08560
commit 63387c83ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 23 deletions

View File

@ -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))

View File

@ -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) {