milvus/client
yihao.dai cc792486a8
feat: Support force promote for primary-secondary failover (#47352)
Add force_promote flag to UpdateReplicateConfiguration API for disaster
recovery.

Changes:

- Add ForcePromote field to UpdateReplicateConfigurationRequest

- Refactor UpdateReplicateConfiguration to accept request object instead
of separate params

- Add WithForcePromote() method to ReplicateConfigurationBuilder

- Implement force promote validation and handling in assignment service

- Add integration tests for force promote scenarios

Force promote allows a secondary cluster to immediately become
standalone primary

when the original primary is unavailable, enabling active-passive
failover.

issue: https://github.com/milvus-io/milvus/issues/47351

design doc:
https://github.com/milvus-io/milvus-design-docs/blob/main/design_docs/20260202-force_promote_failover.md

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: Yihao Dai <yihao.dai@zilliz.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-20 16:09:28 +08:00
..
bulkwriter
column
common
entity feat: [ExternalTable Part3] Support manual refresh for external collections (#47492) 2026-02-26 11:20:46 +08:00
index
milvusclient feat: Support force promote for primary-secondary failover (#47352) 2026-03-20 16:09:28 +08:00
row enhance: [GoSDK] support pointer types for nullable columns in row-based API (#47712) 2026-02-10 18:48:42 +08:00
ruleguard
.golangci.yml
Makefile
OWNERS
README.md enhance: Bump Go version to 1.24.12 and upgrade gpgv fixing CVEs (#47541) 2026-02-04 17:19:50 +08:00
go.mod enhance: upgrade Go dependencies (casbin, gin, lo, cockroachdb/errors) (#47943) 2026-03-16 21:11:26 +08:00
go.sum enhance: upgrade Go dependencies (casbin, gin, lo, cockroachdb/errors) (#47943) 2026-03-16 21:11:26 +08:00

README.md

Go MilvusClient

license Go Reference

Go MilvusClient for Milvus. To contribute code to this project, please read our contribution guidelines first.

Getting started

Prerequisites

Go 1.24.12 or higher

Install Milvus Go SDK

  1. Use go get to install the latest version of the Milvus Go SDK and dependencies:

    go get -u github.com/milvus-io/milvus/client/v2
    
  2. Include the Go MilvusClient in your application:

     import "github.com/milvus-io/milvus/client/v2/milvusclient"
    
     //...other snippet ...
     ctx, cancel := context.WithCancel(context.Background())
     defer cancel()
    
     milvusAddr := "YOUR_MILVUS_ENDPOINT"
    
     cli, err := milvusclient.New(ctx, &milvusclient.ClientConfig{
     	Address: milvusAddr,
     })
     if err != nil {
     	// handle error
     }
    
     // Do your work with milvus client
    

API Documentation

Refer to https://milvus.io/api-reference/go/v2.5.x/About.md for the Go SDK API documentation.

Code format

The Go source code is formatted using gci & gofumpt. Please run make lint-fix before sumbit a PR.