This is the first patch release of the Milvus Go SDK v3, targeting Milvus 3.0.1. It is compared against client/v3.0.0.
This is a stable release for Milvus 3.0. It is not guaranteed to be compatible with Milvus 2.6 servers.
Highlights
- Adds element-level nullability and nested
Array<T>fields, including struct sub-field add and drop support. - Adds the full Row-Level Security (RLS) SDK surface: row policies, principal tags, and a count-only principal listing mode.
- Adds array / struct / JSON path replacement (
WithPathReplace) for partial upserts. - Preserves primary keys in full AutoID upserts so deletes and inserts route to the same VChannel.
- Adds lightweight snapshot summaries (
ListSnapshotSummaries) alongside the legacy names-only listing. - Adds Timestamptz and Geometry support to row-based inserts, and fixes read-back coercion of RFC3339Nano ISO timestamptz strings into
time.Time. - Adds zero-copy aliasing for common slice-typed template parameters, avoiding heap duplication of large
in {list}membership sets. - Bumps
milvus-proto/go-api/v3from v3.0.1 to v3.0.6, and gRPC to v1.84.0 (fixing CVE-2026-84304 and releasing server request buffers right after decoding). - SDK version is now
3.0.1(was3.0.0).
Breaking Changes and Migration
-
Go version: The module's
godirective is bumped to Go 1.25.0 (from 1.24.9). -
Template parameter lifetime contract: slice-valued
WithTemplateParamvalues ([]int64,[]string,[]float64,[]bool) are no longer copied. Do not mutate a slice passed toWithTemplateParamwhile the Search/Query call using it is in flight, and do not mutate it afterRequest()returns. Pass a copy if the caller intends to keep writing to the slice. -
Upsert now always retains an AutoID primary key as its lookup key. Full AutoID Upsert requires Query availability and a loaded target.
-
New protobuf messages:
ListSnapshotsnow carries optionalsnapshotSummaries. Servers that return only names are reported as unsupported byListSnapshotSummaries. -
Installation:
go get github.com/milvus-io/milvus/client/v3@v3.0.1
New Features
- Row-Level Security (RLS): Added the complete client surface for the 3.0 RLS backport:
- Row policies:
CreateRowPolicy,UpdateRowPolicy,DropRowPolicy,ListRowPolicieswithNewCreateRowPolicyOption/NewUpdateRowPolicyOption(WithUsingExpr/WithCheckExpr/WithDescription) and the corresponding list option. - Principal tags:
SetRLSPrincipalTags,GetRLSPrincipalTags,DeleteRLSPrincipalTags(delete selected keys or all keys). - Principal listing:
ListRLSPrincipalsreturns names plus an int64 count, withWithCountOnlyfor a count-only response. (#53932, #50263, #54246) - RLS is threaded through read and write paths:
WithRLSPrincipal/WithSkipRLSon Search, Query, Search/Query iterators, column-based and row-based Insert/Upsert/Delete options, and the REST bulk importer. (#53932)
- Row policies:
- Element-level nullability: Array and vector-array columns now support null elements in addition to null rows:
NewElementNullableColumnXxxArrayconstructors for all scalar array types and vector arrays (Float, Float16, BFloat16, Binary, Int8 vectors), withElementNullableColumninterface accessors (ElementNullable,ElementLen,ElementValidData,ElementIsNull) andWithRowValidData/WithElementSparseModeoptions. Compact (insert) and sparse (result) storage modes are both supported.- Null elements are expressed as nil pointers (
[]*T/[][]*T) on insert and read-back. (#54975, #51162)
- Nested
Array<T>fields: AddedColumnXxxArrayArraycolumns (e.g.ColumnInt64ArrayArray) forArray<Array<T>>struct sub-fields, withNewElementNullableColumnXxxArrayArrayconstructors adding row / element / leaf validity layers andNestedArrayColumnaccessors (LeafType,LeafNullable,LeafValidData,LeafIsNull). (#54975, #51162) - Struct sub-field evolution:
AddCollectionField(andNewAddCollectionFieldOption) now accepts astruct[sub_field]path to add an element of an existing struct, viaAlterCollectionSchema; a legacyUnimplementedserver is reported instead of failing silently. Validation enforces nullable=true for the sub-field and reusesentity.NewStructSchema().WithField.entity.Field.WithElementNullablesets leaf nullability of anArray<T>struct sub-field. (#54975) - Path replacement: Added
WithPathReplace(fieldName, path)to the column-based and row-based partial-update options, replacing one scalar Array element, a complete StructArray element, one child of a struct element, or a value under an explicit JSON field (including a missing final object key and JSON null). (Milvus #53746, #53016) - Snapshot summaries: Added
Client.ListSnapshotSummaries, returning lightweight server-side summaries in the server order (create_ts / create_utc_ts) without a per-nameDescribeSnapshotround-trip. Names-only responses are rejected withErrServiceUnimplemented. (#54981, #52635) - Full AutoID Upsert: Existing rows retain their primary keys (read-based preparation sharing Partial Upsert), so insert and delete for an entity route to the same VChannel; missing lookup keys get allocator-generated IDs and emit inserts only. (#53511, #53157)
- Timestamptz and Geometry row insert: Row-based inserts now support
FieldTypeTimestamptz(mapped toNewColumnTimestamptz, acceptingtime.Time,*time.Timeand RFC3339Nano ISO strings) andFieldTypeGeometry(mapped toNewColumnGeometryWKT). An exhaustive regression test covers all supported scalar field types so a missing creator is caught by CI instead of panicking at runtime. (#53775, #53764) - Timestamptz read-back:
row.CoerceValueandrow.SetFieldparse RFC3339Nano ISO strings back intotime.Time/*time.Timewhen filling typed struct fields from query results. (#53775) - Row field parsing: Row-based reflection (
row.AnyToColumns,row.SetField, struct tag constants) is consolidated into the newclient/internal/rowutilpackage. - Field-specific row validity:
FieldData/ScalarField/VectorFieldnow carry field-specificvalid_data, written to both the legacy and the field-specific locations for rolling-upgrade compatibility between released 3.0.x and this version. Client validity helpers live incolumn/generic_base.go, and a new ruleguard rule (fieldDataValidDataAccess) prevents direct protobufvalid_dataaccess elsewhere in the client. (#54779, #51162, #54330) - Row-level security on bulk import:
BulkImportOptiongainedWithRLSPrincipal/WithSkipRLS. (#53932) - Template zero-copy alias:
slice2TmplValuefast-paths[]int64,[]string,[]float64and[]boolby aliasing the caller's backing array instead of rebuilding the slice element by element (a largein {list}membership set is no longer duplicated on the heap); the reflect-based copy fallback is pinned bytemplate_alias_test.go. (#55633, #51957)
Improvements and Bug Fixes
- Bumped
github.com/milvus-io/milvus-proto/go-api/v3to v3.0.6 across version bumps v3.0.2 through v3.0.6, tracking the 3.0 branch's proto and milvus releases. (#53588, #54164, #54625, #54839, #55293) - Bumped
google.golang.org/grpcto v1.84.0 so a server with stats handlers releases request buffers immediately after decoding instead of holding them for the whole RPC (large search requests no longer pin ~2× their size in proxy heap). (#54271, #54226) - Bumped
google.golang.org/grpcto v1.83.2 fixing CVE-2026-84304 (uncontrolled resource consumption, HIGH). (#54036, #53497) - Backported the Go dependency upgrades from the four master PRs (#53377, #53259, #53205, #53165) plus the missing module declarations (#53456): gRPC 1.82.2, etcd 3.5.33, x/crypto 0.56.0, gorilla/websocket 1.5.3, mongo-driver 1.17.7, Thrift 0.24.0, quic-go 0.59.1, Bedrock runtime 1.50.4, and AWS eventstream 1.7.8 across root, pkg, client, and tests/go_client. (#53454, #53001)
- Search and query iterators now surface empty / error result sets correctly instead of panicking on a nil IDs field or silently returning an empty page. (
iterator.go) merrgainedWrapErrServiceUnimplementedfor the snapshot-summary and struct-sub-field compatibility boundaries. (#54981, #54975)- Compact
inset building (slice2TmplValue) keeps behavior for non-aliased slice element kinds via the reflect fallback.
Known Limitations
- This SDK release is intended for Milvus 3.0 and is not guaranteed to be compatible with Milvus 2.6 servers.
- Row-Level Security requires a server with the RLS implementation; open-source management handlers on servers without RLS return an unsupported-operation error while the proto APIs are retained.
ListSnapshotSummariesrequires a server that returns summaries; a names-only server is reported as unsupported.- Element-nullable and nested-array features require a server that supports the element-level null / recursive Array-Struct layout (Milvus 3.0.x with the corresponding backports); neither the 3.0 release proto nor the server supports element-nullable arrays through REST.
- Struct sub-field add via
AddCollectionFieldrequiresAlterCollectionSchemasupport on the server; a legacy server is reported with anUnimplementederror. - The zero-copy template-parameter alias means slice values must not be mutated while the request is in flight; callers that keep writing to a slice must pass a copy.