github milvus-io/milvus client/v3.0.1

35 minutes ago

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/v3 from 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 (was 3.0.0).

Breaking Changes and Migration

  • Go version: The module's go directive is bumped to Go 1.25.0 (from 1.24.9).

  • Template parameter lifetime contract: slice-valued WithTemplateParam values ([]int64, []string, []float64, []bool) are no longer copied. Do not mutate a slice passed to WithTemplateParam while the Search/Query call using it is in flight, and do not mutate it after Request() 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: ListSnapshots now carries optional snapshotSummaries. Servers that return only names are reported as unsupported by ListSnapshotSummaries.

  • 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, ListRowPolicies with NewCreateRowPolicyOption / NewUpdateRowPolicyOption (WithUsingExpr / WithCheckExpr / WithDescription) and the corresponding list option.
    • Principal tags: SetRLSPrincipalTags, GetRLSPrincipalTags, DeleteRLSPrincipalTags (delete selected keys or all keys).
    • Principal listing: ListRLSPrincipals returns names plus an int64 count, with WithCountOnly for a count-only response. (#53932, #50263, #54246)
    • RLS is threaded through read and write paths: WithRLSPrincipal / WithSkipRLS on Search, Query, Search/Query iterators, column-based and row-based Insert/Upsert/Delete options, and the REST bulk importer. (#53932)
  • Element-level nullability: Array and vector-array columns now support null elements in addition to null rows:
    • NewElementNullableColumnXxxArray constructors for all scalar array types and vector arrays (Float, Float16, BFloat16, Binary, Int8 vectors), with ElementNullableColumn interface accessors (ElementNullable, ElementLen, ElementValidData, ElementIsNull) and WithRowValidData / WithElementSparseMode options. 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: Added ColumnXxxArrayArray columns (e.g. ColumnInt64ArrayArray) for Array<Array<T>> struct sub-fields, with NewElementNullableColumnXxxArrayArray constructors adding row / element / leaf validity layers and NestedArrayColumn accessors (LeafType, LeafNullable, LeafValidData, LeafIsNull). (#54975, #51162)
  • Struct sub-field evolution: AddCollectionField (and NewAddCollectionFieldOption) now accepts a struct[sub_field] path to add an element of an existing struct, via AlterCollectionSchema; a legacy Unimplemented server is reported instead of failing silently. Validation enforces nullable=true for the sub-field and reuses entity.NewStructSchema().WithField. entity.Field.WithElementNullable sets leaf nullability of an Array<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-name DescribeSnapshot round-trip. Names-only responses are rejected with ErrServiceUnimplemented. (#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 to NewColumnTimestamptz, accepting time.Time, *time.Time and RFC3339Nano ISO strings) and FieldTypeGeometry (mapped to NewColumnGeometryWKT). 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.CoerceValue and row.SetField parse RFC3339Nano ISO strings back into time.Time / *time.Time when 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 new client/internal/rowutil package.
  • Field-specific row validity: FieldData / ScalarField / VectorField now carry field-specific valid_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 in column/generic_base.go, and a new ruleguard rule (fieldDataValidDataAccess) prevents direct protobuf valid_data access elsewhere in the client. (#54779, #51162, #54330)
  • Row-level security on bulk import: BulkImportOption gained WithRLSPrincipal / WithSkipRLS. (#53932)
  • Template zero-copy alias: slice2TmplValue fast-paths []int64, []string, []float64 and []bool by aliasing the caller's backing array instead of rebuilding the slice element by element (a large in {list} membership set is no longer duplicated on the heap); the reflect-based copy fallback is pinned by template_alias_test.go. (#55633, #51957)

Improvements and Bug Fixes

  • Bumped github.com/milvus-io/milvus-proto/go-api/v3 to 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/grpc to 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/grpc to 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)
  • merr gained WrapErrServiceUnimplemented for the snapshot-summary and struct-sub-field compatibility boundaries. (#54981, #54975)
  • Compact in set 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.
  • ListSnapshotSummaries requires 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 AddCollectionField requires AlterCollectionSchema support on the server; a legacy server is reported with an Unimplemented error.
  • 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.

Don't miss a new milvus release

NewReleases is sending notifications on new releases.