diff --git a/internal/kv/mem/mem_kv.go b/internal/kv/mem/mem_kv.go index 91c094cc8d727baf38623cb0c97ef4d4d84eeee5..40dc1476e73404ddeb0a78447d0c4f5bff57e799 100644 --- a/internal/kv/mem/mem_kv.go +++ b/internal/kv/mem/mem_kv.go @@ -17,11 +17,11 @@ package memkv import ( + "errors" "strings" "sync" "github.com/google/btree" - "github.com/milvus-io/milvus/internal/common" ) @@ -284,7 +284,7 @@ func (kv *MemoryKV) Close() { // MultiRemoveWithPrefix not implemented func (kv *MemoryKV) MultiRemoveWithPrefix(keys []string) error { - panic("not implement") + return errors.New("not implement") } // MultiSaveAndRemoveWithPrefix saves key-value pairs in @saves, & remove key with prefix in @removals in MemoryKV atomically. diff --git a/internal/proxy/impl.go b/internal/proxy/impl.go index 1e2e2d56080677b7354aa0f76742a9978aa8df93..9fffb131241afcb77decc64121de6b32a69a6e31 100644 --- a/internal/proxy/impl.go +++ b/internal/proxy/impl.go @@ -3773,7 +3773,12 @@ func (node *Proxy) FlushAll(ctx context.Context, _ *milvuspb.FlushAllRequest) (* // GetDdChannel returns the used channel for dd operations. func (node *Proxy) GetDdChannel(ctx context.Context, request *internalpb.GetDdChannelRequest) (*milvuspb.StringResponse, error) { - panic("implement me") + return &milvuspb.StringResponse{ + Status: &commonpb.Status{ + ErrorCode: commonpb.ErrorCode_UnexpectedError, + Reason: "TODO: implement me", + }, + }, nil } // GetPersistentSegmentInfo get the information of sealed segment. diff --git a/internal/proxy/proxy_test.go b/internal/proxy/proxy_test.go index 66fc7b775ec44baa4bbe1111c57a78b979c22fc5..be8466ae661b532c6dc6a13c906b81efe2516861 100644 --- a/internal/proxy/proxy_test.go +++ b/internal/proxy/proxy_test.go @@ -1451,10 +1451,8 @@ func TestProxy(t *testing.T) { }) t.Run("get dd channel", func(t *testing.T) { - f := func() { - _, _ = proxy.GetDdChannel(ctx, &internalpb.GetDdChannelRequest{}) - } - assert.Panics(t, f) + resp, _ := proxy.GetDdChannel(ctx, &internalpb.GetDdChannelRequest{}) + assert.NotEqual(t, commonpb.ErrorCode_Success, resp.Status.ErrorCode) }) wg.Add(1)