Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/blang/semver/v4 v4.0.0
github.com/cockroachdb/errors v1.9.1
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf
github.com/milvus-io/milvus/pkg/v2 v2.6.3
github.com/quasilyte/go-ruleguard/dsl v0.3.23
github.com/samber/lo v1.27.0
Expand Down
4 changes: 2 additions & 2 deletions client/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654 h1:p604i9izeR8eWrQhOFmcmxhNhYlsvTkkmph4b2GbOeg=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf h1:FPXkAqH9xHChgwTE5JXZVe4KKZlBRnnChr305FkcXXM=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
github.com/milvus-io/milvus/pkg/v2 v2.6.3 h1:WDf4mXFWL5Sk/V87yLwRKq24MYMkjS2YA6qraXbLbJA=
github.com/milvus-io/milvus/pkg/v2 v2.6.3/go.mod h1:49umaGHK9nKHJNtgBlF/iB24s1sZ/SG5/Q7iLj/Gc14=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
Expand Down
177 changes: 177 additions & 0 deletions client/milvusclient/mock_milvus_server_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cmd/tools/migration/mmap/mmap_230_240.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (m *MmapMigration) MigrateRootCoordCollection(ctx context.Context) {
newColl.Properties = updateOrAddMmapKey(newColl.Properties, common.MmapEnabledKey, "true")
fmt.Printf("migrate collection %v, %s\n", collection.CollectionID, collection.Name)

if err := m.rootcoordMeta.AlterCollection(ctx, collection, newColl, ts, false); err != nil {
if err := m.rootcoordMeta.AlterCollection(ctx, collection, newColl, ts, false, false); err != nil {
panic(err)
}
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/klauspost/compress v1.17.9
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf
github.com/minio/minio-go/v7 v7.0.73
github.com/panjf2000/ants/v2 v2.11.3 // indirect
github.com/pingcap/log v1.1.1-0.20221015072633-39906604fb81 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,8 @@ github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6 h1:YHMFI6L
github.com/milvus-io/cgosymbolizer v0.0.0-20250318084424-114f4050c3a6/go.mod h1:DvXTE/K/RtHehxU8/GtDs4vFtfw64jJ3PaCnFri8CRg=
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b h1:TfeY0NxYxZzUfIfYe5qYDBzt4ZYRqzUjTR6CvUzjat8=
github.com/milvus-io/gorocksdb v0.0.0-20220624081344-8c5f4212846b/go.mod h1:iwW+9cWfIzzDseEBCCeDSN5SD16Tidvy8cwQ7ZY8Qj4=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654 h1:p604i9izeR8eWrQhOFmcmxhNhYlsvTkkmph4b2GbOeg=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251013093953-f3e0a710c654/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf h1:FPXkAqH9xHChgwTE5JXZVe4KKZlBRnnChr305FkcXXM=
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.4-0.20251014023152-77b975a944bf/go.mod h1:/6UT4zZl6awVeXLeE7UGDWZvXj3IWkRsh3mqsn0DiAs=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8 h1:AMFGa4R4MiIpspGNG7Z948v4n35fFGB3RR3G/ry4FWs=
github.com/minio/asm2plan9s v0.0.0-20200509001527-cdd76441f9d8/go.mod h1:mC1jAcsrzbxHt8iiaC+zU4b1ylILSosueou12R++wfY=
github.com/minio/c2goasm v0.0.0-20190812172519-36a3d3bbc4f3 h1:+n/aFZefKZp7spd8DFdX7uMikMLXX4oubIzJF4kv/wI=
Expand Down
12 changes: 12 additions & 0 deletions internal/coordinator/mix_coord.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,18 @@ func (s *mixCoordImpl) AlterCollectionField(ctx context.Context, req *milvuspb.A
return s.rootcoordServer.AlterCollectionField(ctx, req)
}

func (s *mixCoordImpl) AddCollectionFunction(ctx context.Context, req *milvuspb.AddCollectionFunctionRequest) (*commonpb.Status, error) {
return s.rootcoordServer.AddCollectionFunction(ctx, req)
}

func (s *mixCoordImpl) AlterCollectionFunction(ctx context.Context, req *milvuspb.AlterCollectionFunctionRequest) (*commonpb.Status, error) {
return s.rootcoordServer.AlterCollectionFunction(ctx, req)
}

func (s *mixCoordImpl) DropCollectionFunction(ctx context.Context, req *milvuspb.DropCollectionFunctionRequest) (*commonpb.Status, error) {
return s.rootcoordServer.DropCollectionFunction(ctx, req)
}

func (s *mixCoordImpl) CreatePartition(ctx context.Context, req *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
return s.rootcoordServer.CreatePartition(ctx, req)
}
Expand Down
3 changes: 1 addition & 2 deletions internal/datacoord/mock_handler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions internal/datacoord/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,18 @@ func (m *mockMixCoord) AlterCollectionField(ctx context.Context, request *milvus
panic("not implemented") // TODO: Implement
}

func (m *mockMixCoord) AddCollectionFunction(ctx context.Context, request *milvuspb.AddCollectionFunctionRequest) (*commonpb.Status, error) {
panic("not implemented") // TODO: Implement
}

func (m *mockMixCoord) AlterCollectionFunction(ctx context.Context, request *milvuspb.AlterCollectionFunctionRequest) (*commonpb.Status, error) {
panic("not implemented") // TODO: Implement
}

func (m *mockMixCoord) DropCollectionFunction(ctx context.Context, request *milvuspb.DropCollectionFunctionRequest) (*commonpb.Status, error) {
panic("not implemented") // TODO: Implement
}

func (m *mockMixCoord) CreatePartition(ctx context.Context, req *milvuspb.CreatePartitionRequest) (*commonpb.Status, error) {
panic("not implemented") // TODO: Implement
}
Expand Down
33 changes: 33 additions & 0 deletions internal/distributed/mixcoord/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,39 @@ func (c *Client) AlterCollectionField(ctx context.Context, request *milvuspb.Alt
})
}

func (c *Client) AddCollectionFunction(ctx context.Context, request *milvuspb.AddCollectionFunctionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
request = typeutil.Clone(request)
commonpbutil.UpdateMsgBase(
request.GetBase(),
commonpbutil.FillMsgBaseFromClient(paramtable.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())),
)
return wrapGrpcCall(ctx, c, func(client MixCoordClient) (*commonpb.Status, error) {
return client.AddCollectionFunction(ctx, request)
})
}

func (c *Client) AlterCollectionFunction(ctx context.Context, request *milvuspb.AlterCollectionFunctionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
request = typeutil.Clone(request)
commonpbutil.UpdateMsgBase(
request.GetBase(),
commonpbutil.FillMsgBaseFromClient(paramtable.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())),
)
return wrapGrpcCall(ctx, c, func(client MixCoordClient) (*commonpb.Status, error) {
return client.AlterCollectionFunction(ctx, request)
})
}

func (c *Client) DropCollectionFunction(ctx context.Context, request *milvuspb.DropCollectionFunctionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
request = typeutil.Clone(request)
commonpbutil.UpdateMsgBase(
request.GetBase(),
commonpbutil.FillMsgBaseFromClient(paramtable.GetNodeID(), commonpbutil.WithTargetID(c.grpcClient.GetNodeID())),
)
return wrapGrpcCall(ctx, c, func(client MixCoordClient) (*commonpb.Status, error) {
return client.DropCollectionFunction(ctx, request)
})
}

// CreatePartition create partition
func (c *Client) CreatePartition(ctx context.Context, in *milvuspb.CreatePartitionRequest, opts ...grpc.CallOption) (*commonpb.Status, error) {
in = typeutil.Clone(in)
Expand Down
12 changes: 12 additions & 0 deletions internal/distributed/mixcoord/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ func Test_NewClient(t *testing.T) {
r, err := client.AlterCollection(ctx, nil)
retCheck(retNotNil, r, err)
}
{
r, err := client.AddCollectionFunction(ctx, nil)
retCheck(retNotNil, r, err)
}
{
r, err := client.AlterCollectionFunction(ctx, nil)
retCheck(retNotNil, r, err)
}
{
r, err := client.DropCollectionFunction(ctx, nil)
retCheck(retNotNil, r, err)
}
{
r, err := client.AlterDatabase(ctx, nil)
retCheck(retNotNil, r, err)
Expand Down
12 changes: 12 additions & 0 deletions internal/distributed/mixcoord/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,18 @@ func (s *Server) AlterCollectionField(ctx context.Context, request *milvuspb.Alt
return s.mixCoord.AlterCollectionField(ctx, request)
}

func (s *Server) AddCollectionFunction(ctx context.Context, request *milvuspb.AddCollectionFunctionRequest) (*commonpb.Status, error) {
return s.mixCoord.AddCollectionFunction(ctx, request)
}

func (s *Server) AlterCollectionFunction(ctx context.Context, request *milvuspb.AlterCollectionFunctionRequest) (*commonpb.Status, error) {
return s.mixCoord.AlterCollectionFunction(ctx, request)
}

func (s *Server) DropCollectionFunction(ctx context.Context, request *milvuspb.DropCollectionFunctionRequest) (*commonpb.Status, error) {
return s.mixCoord.DropCollectionFunction(ctx, request)
}

func (s *Server) RenameCollection(ctx context.Context, request *milvuspb.RenameCollectionRequest) (*commonpb.Status, error) {
return s.mixCoord.RenameCollection(ctx, request)
}
Expand Down
3 changes: 3 additions & 0 deletions internal/distributed/proxy/httpserver/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ const (
RevokePrivilegeActionV2 = "revoke_privilege_v2"
AlterAction = "alter"
AlterPropertiesAction = "alter_properties"
AddFunctionAction = "add_function"
AlterFunctionAction = "alter_function"
DropFunctionAction = "drop_function"
AddAction = `add`
DropPropertiesAction = "drop_properties"
CompactAction = "compact"
Expand Down
Loading
Loading