未验证 提交 cc5bee46 编写于 作者: X xige-16 提交者: GitHub

Stop handoff if segment has been compacted (#15181)

Signed-off-by: Nxige-16 <xi.ge@zilliz.com>
上级 2819f6cc
......@@ -285,7 +285,7 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"\006Failed\020\004*s\n\014SegmentState\022\024\n\020SegmentStat"
"eNone\020\000\022\014\n\010NotExist\020\001\022\013\n\007Growing\020\002\022\n\n\006Se"
"aled\020\003\022\013\n\007Flushed\020\004\022\014\n\010Flushing\020\005\022\013\n\007Dro"
"pped\020\006*\223\t\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n\020Cre"
"pped\020\006*\251\t\n\007MsgType\022\r\n\tUndefined\020\000\022\024\n\020Cre"
"ateCollection\020d\022\022\n\016DropCollection\020e\022\021\n\rH"
"asCollection\020f\022\026\n\022DescribeCollection\020g\022\023"
"\n\017ShowCollections\020h\022\024\n\020GetSystemConfigs\020"
......@@ -310,17 +310,18 @@ const char descriptor_table_protodef_common_2eproto[] PROTOBUF_SECTION_VARIABLE(
"QueryChannels\020\377\003\022\035\n\030SealedSegmentsChange"
"Info\020\200\004\022\027\n\022WatchDeltaChannels\020\201\004\022\020\n\013Segm"
"entInfo\020\330\004\022\017\n\nSystemInfo\020\331\004\022\024\n\017GetRecove"
"ryInfo\020\332\004\022\r\n\010TimeTick\020\260\t\022\023\n\016QueryNodeSta"
"ts\020\261\t\022\016\n\tLoadIndex\020\262\t\022\016\n\tRequestID\020\263\t\022\017\n"
"\nRequestTSO\020\264\t\022\024\n\017AllocateSegment\020\265\t\022\026\n\021"
"SegmentStatistics\020\266\t\022\025\n\020SegmentFlushDone"
"\020\267\t\022\017\n\nDataNodeTt\020\270\t*\"\n\007DslType\022\007\n\003Dsl\020\000"
"\022\016\n\nBoolExprV1\020\001*B\n\017CompactionState\022\021\n\rU"
"ndefiedState\020\000\022\r\n\tExecuting\020\001\022\r\n\tComplet"
"ed\020\002*X\n\020ConsistencyLevel\022\n\n\006Strong\020\000\022\013\n\007"
"Session\020\001\022\013\n\007Bounded\020\002\022\016\n\nEventually\020\003\022\016"
"\n\nCustomized\020\004B5Z3github.com/milvus-io/m"
"ilvus/internal/proto/commonpbb\006proto3"
"ryInfo\020\332\004\022\024\n\017GetSegmentState\020\333\004\022\r\n\010TimeT"
"ick\020\260\t\022\023\n\016QueryNodeStats\020\261\t\022\016\n\tLoadIndex"
"\020\262\t\022\016\n\tRequestID\020\263\t\022\017\n\nRequestTSO\020\264\t\022\024\n\017"
"AllocateSegment\020\265\t\022\026\n\021SegmentStatistics\020"
"\266\t\022\025\n\020SegmentFlushDone\020\267\t\022\017\n\nDataNodeTt\020"
"\270\t*\"\n\007DslType\022\007\n\003Dsl\020\000\022\016\n\nBoolExprV1\020\001*B"
"\n\017CompactionState\022\021\n\rUndefiedState\020\000\022\r\n\t"
"Executing\020\001\022\r\n\tCompleted\020\002*X\n\020Consistenc"
"yLevel\022\n\n\006Strong\020\000\022\013\n\007Session\020\001\022\013\n\007Bound"
"ed\020\002\022\016\n\nEventually\020\003\022\016\n\nCustomized\020\004B5Z3"
"github.com/milvus-io/milvus/internal/pro"
"to/commonpbb\006proto3"
;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_common_2eproto_deps[1] = {
};
......@@ -337,7 +338,7 @@ static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_com
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_common_2eproto_once;
static bool descriptor_table_common_2eproto_initialized = false;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_common_2eproto = {
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2717,
&descriptor_table_common_2eproto_initialized, descriptor_table_protodef_common_2eproto, "common.proto", 2739,
&descriptor_table_common_2eproto_once, descriptor_table_common_2eproto_sccs, descriptor_table_common_2eproto_deps, 8, 0,
schemas, file_default_instances, TableStruct_common_2eproto::offsets,
file_level_metadata_common_2eproto, 8, file_level_enum_descriptors_common_2eproto, file_level_service_descriptors_common_2eproto,
......@@ -477,6 +478,7 @@ bool MsgType_IsValid(int value) {
case 600:
case 601:
case 602:
case 603:
case 1200:
case 1201:
case 1202:
......
......@@ -256,6 +256,7 @@ enum MsgType : int {
SegmentInfo = 600,
SystemInfo = 601,
GetRecoveryInfo = 602,
GetSegmentState = 603,
TimeTick = 1200,
QueryNodeStats = 1201,
LoadIndex = 1202,
......
......@@ -294,7 +294,6 @@ func TestGetSegmentStates(t *testing.T) {
assert.EqualValues(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode)
assert.EqualValues(t, 1, len(resp.States))
if test.expected {
assert.EqualValues(t, commonpb.ErrorCode_Success, resp.States[0].Status.ErrorCode)
assert.EqualValues(t, test.expectedState, resp.States[0].State)
}
})
......
......@@ -174,15 +174,12 @@ func (s *Server) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentSta
for _, segmentID := range req.SegmentIDs {
state := &datapb.SegmentStateInfo{
Status: &commonpb.Status{},
SegmentID: segmentID,
}
segmentInfo := s.meta.GetSegment(segmentID)
if segmentInfo == nil {
state.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
state.Status.Reason = fmt.Sprintf("failed to get segment %d", segmentID)
state.State = commonpb.SegmentState_NotExist
} else {
state.Status.ErrorCode = commonpb.ErrorCode_Success
state.State = segmentInfo.GetState()
state.StartPosition = segmentInfo.GetStartPosition()
}
......
......@@ -141,6 +141,7 @@ enum MsgType {
SegmentInfo = 600;
SystemInfo = 601;
GetRecoveryInfo = 602;
GetSegmentState = 603;
/* SYSTEM CONTROL */
TimeTick = 1200;
......
......@@ -253,6 +253,7 @@ const (
MsgType_SegmentInfo MsgType = 600
MsgType_SystemInfo MsgType = 601
MsgType_GetRecoveryInfo MsgType = 602
MsgType_GetSegmentState MsgType = 603
// SYSTEM CONTROL
MsgType_TimeTick MsgType = 1200
MsgType_QueryNodeStats MsgType = 1201
......@@ -314,6 +315,7 @@ var MsgType_name = map[int32]string{
600: "SegmentInfo",
601: "SystemInfo",
602: "GetRecoveryInfo",
603: "GetSegmentState",
1200: "TimeTick",
1201: "QueryNodeStats",
1202: "LoadIndex",
......@@ -374,6 +376,7 @@ var MsgType_value = map[string]int32{
"SegmentInfo": 600,
"SystemInfo": 601,
"GetRecoveryInfo": 602,
"GetSegmentState": 603,
"TimeTick": 1200,
"QueryNodeStats": 1201,
"LoadIndex": 1202,
......@@ -879,99 +882,100 @@ func init() {
func init() { proto.RegisterFile("common.proto", fileDescriptor_555bd8c177793206) }
var fileDescriptor_555bd8c177793206 = []byte{
// 1503 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x72, 0x1b, 0x4b,
0x11, 0xf6, 0x6a, 0x15, 0xcb, 0x6a, 0xcb, 0xf6, 0x64, 0xfc, 0x13, 0x9f, 0x10, 0xa8, 0x94, 0xaf,
0x52, 0xae, 0x3a, 0x09, 0x90, 0x02, 0xae, 0xce, 0x85, 0xa5, 0xb5, 0x1d, 0x55, 0x62, 0xc7, 0x48,
0x4e, 0x38, 0xc5, 0x05, 0xa9, 0xf1, 0x6e, 0x5b, 0x1a, 0x32, 0x3b, 0x23, 0x66, 0x66, 0x1d, 0x8b,
0x2b, 0x78, 0x03, 0x38, 0xbc, 0x06, 0x50, 0xfc, 0x43, 0xf1, 0x04, 0xfc, 0x5f, 0x03, 0x4f, 0xc0,
0x03, 0xf0, 0x7b, 0x7e, 0xa9, 0x9e, 0x5d, 0x49, 0x7b, 0xaa, 0x4e, 0xae, 0xce, 0xdd, 0xf6, 0xd7,
0xdd, 0x5f, 0xf7, 0x74, 0xf7, 0xf4, 0x0e, 0x74, 0x52, 0x93, 0xe7, 0x46, 0xdf, 0x9f, 0x58, 0xe3,
0x0d, 0xdf, 0xcc, 0xa5, 0xba, 0x2a, 0x5c, 0x29, 0xdd,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0x85, 0x2a,
0x6c, 0x51, 0x6f, 0x8d, 0x1e, 0xb1, 0xa5, 0xf0, 0x36, 0xc0, 0xf0, 0x8f, 0x2f, 0x77, 0x6d, 0x97,
0x7e, 0x86, 0xe1, 0x01, 0xb0, 0x0e, 0x70, 0x78, 0x85, 0xda, 0x17, 0x42, 0xa9, 0x29, 0x8b, 0x49,
0xee, 0x15, 0xce, 0x9b, 0x5c, 0x7e, 0x9b, 0x56, 0x6e, 0xf7, 0x4b, 0x5f, 0x7f, 0x38, 0x92, 0x7e,
0x5c, 0x5c, 0xd0, 0x03, 0xe5, 0x41, 0xf9, 0x62, 0x79, 0x53, 0x9a, 0xea, 0xeb, 0x81, 0xd4, 0x1e,
0xad, 0x16, 0xea, 0x41, 0x78, 0xc4, 0x3c, 0x28, 0x1f, 0x31, 0x93, 0x8b, 0x8b, 0xe5, 0x20, 0x3f,
0xfc, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x23, 0x0e, 0xd4, 0xcf, 0x15, 0x0b, 0x00, 0x00,
// 1509 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x5b, 0x73, 0x1b, 0x4b,
0x11, 0xf6, 0x6a, 0x15, 0xcb, 0x6a, 0xcb, 0xf6, 0x64, 0x7c, 0x89, 0x4f, 0x08, 0x54, 0xca, 0x4f,
0x29, 0x57, 0x9d, 0x04, 0x48, 0x01, 0x4f, 0xe7, 0xc1, 0xd2, 0xda, 0x8e, 0x2a, 0xb1, 0x63, 0x24,
0x27, 0x9c, 0xe2, 0x81, 0xd4, 0x78, 0xb7, 0x2d, 0x0d, 0x99, 0x9d, 0x11, 0x33, 0xb3, 0x8e, 0xc5,
0x13, 0xfc, 0x03, 0x38, 0xff, 0x82, 0x2a, 0xa0, 0xb8, 0x43, 0xf1, 0x0b, 0xb8, 0x3f, 0x73, 0xf9,
0x03, 0xfc, 0x00, 0xae, 0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xca, 0xb5, 0x86, 0x59, 0x79, 0xea, 0x25, 0x5a, 0x0f, 0x87, 0xd7, 0x98, 0x16, 0x9e, 0x36, 0x62,
0x44, 0x22, 0x39, 0xd1, 0xd0, 0x66, 0xac, 0xb1, 0xff, 0x36, 0xb0, 0x9e, 0xd1, 0x4e, 0x3a, 0x8f,
0x3a, 0x9d, 0x3e, 0xc1, 0x2b, 0x54, 0x61, 0xb7, 0x7a, 0x6b, 0xf4, 0x88, 0x2d, 0x85, 0x17, 0x03,
0x86, 0x3f, 0x7f, 0xb9, 0x81, 0xbb, 0xf4, 0x8b, 0x0c, 0xcf, 0x82, 0x75, 0x80, 0xc3, 0x2b, 0xd4,
0xbe, 0x10, 0x4a, 0x4d, 0x59, 0x4c, 0x72, 0xaf, 0x70, 0xde, 0xe4, 0xf2, 0x9b, 0xb4, 0x88, 0xbb,
0x5f, 0xf8, 0xea, 0xc3, 0x91, 0xf4, 0xe3, 0xe2, 0x82, 0x9e, 0x2d, 0x0f, 0xca, 0x77, 0xcc, 0x9b,
0xd2, 0x54, 0x5f, 0x0f, 0xa4, 0xf6, 0x68, 0xb5, 0x50, 0x0f, 0xc2, 0xd3, 0xe6, 0x41, 0xf9, 0xb4,
0x99, 0x5c, 0x5c, 0x2c, 0x07, 0xf9, 0xe1, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x51, 0x37, 0xf3,
0x7a, 0x2b, 0x0b, 0x00, 0x00,
}
......@@ -28,6 +28,7 @@ import (
"github.com/milvus-io/milvus/internal/kv"
"github.com/milvus-io/milvus/internal/log"
"github.com/milvus-io/milvus/internal/proto/commonpb"
"github.com/milvus-io/milvus/internal/proto/datapb"
"github.com/milvus-io/milvus/internal/proto/indexpb"
"github.com/milvus-io/milvus/internal/proto/milvuspb"
"github.com/milvus-io/milvus/internal/proto/querypb"
......@@ -192,13 +193,25 @@ func (ic *IndexChecker) checkIndexLoop() {
validHandoffReq, collectionInfo := ic.verifyHandoffReqValid(segmentInfo)
if validHandoffReq && Params.QueryCoordCfg.AutoHandoff {
indexInfo, err := getIndexInfo(ic.ctx, segmentInfo, collectionInfo.Schema, ic.rootCoord, ic.indexCoord)
if err == nil {
// if index exist or not enableIndex, ready to load
segmentInfo.IndexInfos = indexInfo
ic.enqueueIndexedSegment(segmentInfo)
break
}
// if segment has not been compacted and dropped, continue to wait for the build index to complete
segmentState, err := getSegmentStates(ic.ctx, segmentInfo.SegmentID, ic.dataCoord)
if err != nil {
log.Warn("checkIndexLoop: get segment state failed", zap.Int64("segmentID", segmentInfo.SegmentID), zap.Error(err))
continue
}
if segmentState.State != commonpb.SegmentState_NotExist {
continue
}
segmentInfo.IndexInfos = indexInfo
ic.enqueueIndexedSegment(segmentInfo)
break
log.Debug("checkIndexLoop: segment has been compacted and dropped before handoff", zap.Int64("segmentID", segmentInfo.SegmentID))
}
buildQuerySegmentPath := fmt.Sprintf("%s/%d/%d/%d", handoffSegmentPrefix, segmentInfo.CollectionID, segmentInfo.PartitionID, segmentInfo.SegmentID)
......@@ -335,3 +348,31 @@ func getIndexInfo(ctx context.Context, info *querypb.SegmentInfo, schema *schema
}
return []*querypb.VecFieldIndexInfo{indexInfo}, nil
}
func getSegmentStates(ctx context.Context, segmentID UniqueID, dataCoord types.DataCoord) (*datapb.SegmentStateInfo, error) {
ctx2, cancel2 := context.WithTimeout(ctx, timeoutForRPC)
defer cancel2()
req := &datapb.GetSegmentStatesRequest{
Base: &commonpb.MsgBase{
MsgType: commonpb.MsgType_GetSegmentState,
},
SegmentIDs: []UniqueID{segmentID},
}
resp, err := dataCoord.GetSegmentStates(ctx2, req)
if err != nil {
return nil, err
}
if resp.Status.ErrorCode != commonpb.ErrorCode_Success {
err = errors.New(resp.Status.Reason)
return nil, err
}
if len(resp.States) != 1 {
err = errors.New("the length of segmentStates result should be 1")
return nil, err
}
return resp.States[0], nil
}
......@@ -154,6 +154,55 @@ func TestCheckIndexLoop(t *testing.T) {
cancel()
}
func TestHandoffNotExistSegment(t *testing.T) {
refreshParams()
ctx, cancel := context.WithCancel(context.Background())
etcdCli, err := etcd.GetEtcdClient(&Params.BaseParams)
defer etcdCli.Close()
assert.Nil(t, err)
kv := etcdkv.NewEtcdKV(etcdCli, Params.BaseParams.MetaRootPath)
meta, err := newMeta(ctx, kv, nil, nil)
assert.Nil(t, err)
rootCoord := newRootCoordMock()
assert.Nil(t, err)
indexCoord := newIndexCoordMock()
indexCoord.returnError = true
dataCoord, err := newDataCoordMock(ctx)
assert.Nil(t, err)
dataCoord.segmentNotExist = true
meta.addCollection(defaultCollectionID, querypb.LoadType_loadCollection, genCollectionSchema(defaultCollectionID, false))
segmentInfo := &querypb.SegmentInfo{
SegmentID: defaultSegmentID,
CollectionID: defaultCollectionID,
PartitionID: defaultPartitionID,
SegmentState: commonpb.SegmentState_Sealed,
}
key := fmt.Sprintf("%s/%d/%d/%d", handoffSegmentPrefix, defaultCollectionID, defaultPartitionID, defaultSegmentID)
value, err := proto.Marshal(segmentInfo)
assert.Nil(t, err)
indexChecker, err := newIndexChecker(ctx, kv, meta, nil, nil, rootCoord, indexCoord, dataCoord)
assert.Nil(t, err)
err = kv.Save(key, string(value))
assert.Nil(t, err)
indexChecker.enqueueHandoffReq(segmentInfo)
indexChecker.wg.Add(1)
go indexChecker.checkIndexLoop()
for {
_, err := kv.Load(key)
if err != nil {
break
}
}
assert.Equal(t, 0, len(indexChecker.indexedSegmentsChan))
cancel()
indexChecker.wg.Wait()
}
func TestProcessHandoffAfterIndexDone(t *testing.T) {
refreshParams()
ctx, cancel := context.WithCancel(context.Background())
......
......@@ -302,6 +302,7 @@ type dataCoordMock struct {
Segment2Binlog map[UniqueID]*datapb.SegmentBinlogs
baseSegmentID UniqueID
channelNumPerCol int
segmentNotExist bool
}
func newDataCoordMock(ctx context.Context) (*dataCoordMock, error) {
......@@ -402,9 +403,33 @@ func (data *dataCoordMock) GetRecoveryInfo(ctx context.Context, req *datapb.GetR
}, nil
}
func (data *dataCoordMock) GetSegmentStates(ctx context.Context, req *datapb.GetSegmentStatesRequest) (*datapb.GetSegmentStatesResponse, error) {
var state commonpb.SegmentState
if data.segmentNotExist {
state = commonpb.SegmentState_NotExist
} else {
state = commonpb.SegmentState_Flushed
}
var segmentStates []*datapb.SegmentStateInfo
for _, segmentID := range req.SegmentIDs {
segmentStates = append(segmentStates, &datapb.SegmentStateInfo{
SegmentID: segmentID,
State: state,
})
}
return &datapb.GetSegmentStatesResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_Success,
},
States: segmentStates,
}, nil
}
type indexCoordMock struct {
types.IndexCoord
returnIndexFile bool
returnError bool
}
func newIndexCoordMock() *indexCoordMock {
......@@ -419,6 +444,12 @@ func (c *indexCoordMock) GetIndexFilePaths(ctx context.Context, req *indexpb.Get
ErrorCode: commonpb.ErrorCode_Success,
},
}
if c.returnError {
res.Status.ErrorCode = commonpb.ErrorCode_UnexpectedError
return res, nil
}
if c.returnIndexFile {
indexPaths, _ := generateIndex(defaultSegmentID)
indexPathInfo := &indexpb.IndexFilePathInfo{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册