diff --git a/internal/proxy/database_interceptor.go b/internal/proxy/database_interceptor.go index 85578d5029df5..2b12a9fe6b6c6 100644 --- a/internal/proxy/database_interceptor.go +++ b/internal/proxy/database_interceptor.go @@ -68,6 +68,11 @@ func fillDatabase(ctx context.Context, req interface{}) (context.Context, interf r.DbName = GetCurDBNameFromContextOrDefault(ctx) } return ctx, r + case *milvuspb.AlterCollectionFieldRequest: + if r.DbName == "" { + r.DbName = GetCurDBNameFromContextOrDefault(ctx) + } + return ctx, r case *milvuspb.CreatePartitionRequest: if r.DbName == "" { r.DbName = GetCurDBNameFromContextOrDefault(ctx) diff --git a/internal/proxy/database_interceptor_test.go b/internal/proxy/database_interceptor_test.go index bf989c76e632c..d5c84e721f816 100644 --- a/internal/proxy/database_interceptor_test.go +++ b/internal/proxy/database_interceptor_test.go @@ -57,6 +57,7 @@ func TestDatabaseInterceptor(t *testing.T) { &milvuspb.GetCollectionStatisticsRequest{}, &milvuspb.ShowCollectionsRequest{}, &milvuspb.AlterCollectionRequest{}, + &milvuspb.AlterCollectionFieldRequest{}, &milvuspb.CreatePartitionRequest{}, &milvuspb.DropPartitionRequest{}, &milvuspb.HasPartitionRequest{},