mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 02:05:41 +00:00
## Summary Adds Go SDK RESTful wrappers for the Import 2PC commit/abort endpoints introduced server-side in #48524, mirroring the existing `GetImportProgress` wrapper in `client/bulkwriter/bulk_import.go`: - `CommitImport` → `POST /v2/vectordb/jobs/import/commit` - `AbortImport` → `POST /v2/vectordb/jobs/import/abort` Both take a `jobId` (plus optional `clusterId`/`apiKey`) and delegate status handling to the existing `ResponseBase.CheckStatus` helper. The 2PC opt-in (`auto_commit=false`) continues to flow through the existing import-create `options` map, so no create-path change is needed. issue: #48525 ### Changes **Modified:** - `client/bulkwriter/bulk_import.go`: add `CommitImportOption`/`AbortImportOption` (+ constructors, `WithAPIKey`, `GetRequest`), `CommitImportResponse`/`AbortImportResponse`, and the `CommitImport`/`AbortImport` functions. - `client/bulkwriter/bulk_import_test.go`: add `TestCommitImport`/`TestAbortImport` (normal / status-error / server-closed cases). ### Test Plan - [x] `go test ./bulkwriter/` — `TestBulkImportAPIs` suite passes (incl. new `TestCommitImport`/`TestAbortImport`). - [x] `gofumpt` clean; imports unchanged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: bigsheeper <yihao.dai@zilliz.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>