mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
issue: #44358 Implement complete snapshot management system including creation, deletion, listing, description, and restoration capabilities across all system components. Key features: - Create snapshots for entire collections - Drop snapshots by name with proper cleanup - List snapshots with collection filtering - Describe snapshot details and metadata Components added/modified: - Client SDK with full snapshot API support and options - DataCoord snapshot service with metadata management - Proxy layer with task-based snapshot operations - Protocol buffer definitions for snapshot RPCs - Comprehensive unit tests with mockey framework - Integration tests for end-to-end validation Technical implementation: - Snapshot metadata storage in etcd with proper indexing - File-based snapshot data persistence in object storage - Garbage collection integration for snapshot cleanup - Error handling and validation across all operations - Thread-safe operations with proper locking mechanisms <!-- This is an auto-generated comment: release notes by coderabbit.ai --> - Core invariant/assumption: snapshots are immutable point‑in‑time captures identified by (collection, snapshot name/ID); etcd snapshot metadata is authoritative for lifecycle (PENDING → COMMITTED → DELETING) and per‑segment manifests live in object storage (Avro / StorageV2). GC and restore logic must see snapshotRefIndex loaded (snapshotMeta.IsRefIndexLoaded) before reclaiming or relying on segment/index files. - New capability added: full end‑to‑end snapshot subsystem — client SDK APIs (Create/Drop/List/Describe/Restore + restore job queries), DataCoord SnapshotWriter/Reader (Avro + StorageV2 manifests), snapshotMeta in meta, SnapshotManager orchestration (create/drop/describe/list/restore), copy‑segment restore tasks/inspector/checker, proxy & RPC surface, GC integration, and docs/tests — enabling point‑in‑time collection snapshots persisted to object storage and restorations orchestrated across components. - Logic removed/simplified and why: duplicated recursive compaction/delta‑log traversal and ad‑hoc lookup code were consolidated behind two focused APIs/owners (Handler.GetDeltaLogFromCompactTo for delta traversal and SnapshotManager/SnapshotReader for snapshot I/O). MixCoord/coordinator broker paths were converted to thin RPC proxies. This eliminates multiple implementations of the same traversal/lookup, reducing divergence and simplifying responsibility boundaries. - Why this does NOT introduce data loss or regressions: snapshot create/drop use explicit two‑phase semantics (PENDING → COMMIT/DELETING) with SnapshotWriter writing manifests and metadata before commit; GC uses snapshotRefIndex guards and IsRefIndexLoaded/GetSnapshotBySegment/GetSnapshotByIndex checks to avoid removing referenced files; restore flow pre‑allocates job IDs, validates resources (partitions/indexes), performs rollback on failure (rollbackRestoreSnapshot), and converts/updates segment/index metadata only after successful copy tasks. Extensive unit and integration tests exercise pending/deleting/GC/restore/error paths to ensure idempotence and protection against premature deletion. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Wei Liu <wei.liu@zilliz.com>
125 lines
5.9 KiB
Modula-2
125 lines
5.9 KiB
Modula-2
module github.com/milvus-io/milvus/tests/go_client
|
|
|
|
go 1.24.11
|
|
|
|
require (
|
|
github.com/milvus-io/milvus-proto/go-api/v2 v2.6.6-0.20251215075310-deda9c0dcece
|
|
github.com/milvus-io/milvus/client/v2 v2.0.0-20241125024034-0b9edb62a92d
|
|
github.com/milvus-io/milvus/pkg/v2 v2.6.4-0.20251104142533-a2ce70d25256
|
|
github.com/peterstace/simplefeatures v0.54.0
|
|
github.com/quasilyte/go-ruleguard/dsl v0.3.23
|
|
github.com/samber/lo v1.27.0
|
|
github.com/stretchr/testify v1.11.1
|
|
github.com/twpayne/go-geom v1.6.1
|
|
github.com/x448/float16 v0.8.4
|
|
go.uber.org/zap v1.27.0
|
|
google.golang.org/grpc v1.71.0
|
|
)
|
|
|
|
replace github.com/milvus-io/milvus/client/v2 => ../../../milvus/client
|
|
|
|
require (
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
github.com/blang/semver/v4 v4.0.0 // indirect
|
|
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/cilium/ebpf v0.11.0 // indirect
|
|
github.com/cockroachdb/errors v1.9.1 // indirect
|
|
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
|
|
github.com/cockroachdb/redact v1.1.3 // indirect
|
|
github.com/containerd/cgroups/v3 v3.0.3 // indirect
|
|
github.com/coreos/go-semver v0.3.0 // indirect
|
|
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/docker/go-units v0.5.0 // indirect
|
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
|
github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect
|
|
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
|
github.com/getsentry/sentry-go v0.12.0 // indirect
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-ole/go-ole v1.3.0 // indirect
|
|
github.com/godbus/dbus/v5 v5.0.4 // indirect
|
|
github.com/gogo/protobuf v1.3.2 // indirect
|
|
github.com/golang/protobuf v1.5.4 // indirect
|
|
github.com/google/btree v1.1.2 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/gorilla/websocket v1.5.0 // indirect
|
|
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
|
|
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
|
|
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
|
|
github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect
|
|
github.com/jonboulle/clockwork v0.2.2 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/compress v1.17.9 // indirect
|
|
github.com/kr/pretty v0.3.1 // indirect
|
|
github.com/kr/text v0.2.0 // indirect
|
|
github.com/lufia/plan9stats v0.0.0-20240226150601-1dcf7310316a // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
github.com/opencontainers/runtime-spec v1.0.2 // indirect
|
|
github.com/panjf2000/ants/v2 v2.11.3 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
|
|
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
|
|
github.com/prometheus/client_golang v1.20.5 // indirect
|
|
github.com/prometheus/client_model v0.6.1 // indirect
|
|
github.com/prometheus/common v0.55.0 // indirect
|
|
github.com/prometheus/procfs v0.15.1 // indirect
|
|
github.com/rogpeppe/go-internal v1.13.1 // indirect
|
|
github.com/shirou/gopsutil/v3 v3.24.2 // indirect
|
|
github.com/shoenig/go-m1cpu v0.1.6 // indirect
|
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
|
github.com/soheilhy/cmux v0.1.5 // indirect
|
|
github.com/spaolacci/murmur3 v1.1.0 // indirect
|
|
github.com/spf13/cast v1.3.1 // indirect
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/tidwall/gjson v1.17.1 // indirect
|
|
github.com/tidwall/match v1.1.1 // indirect
|
|
github.com/tidwall/pretty v1.2.0 // indirect
|
|
github.com/tklauser/go-sysconf v0.3.13 // indirect
|
|
github.com/tklauser/numcpus v0.7.0 // indirect
|
|
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect
|
|
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
|
|
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
|
|
github.com/yusufpapurcu/wmi v1.2.4 // indirect
|
|
go.etcd.io/bbolt v1.3.6 // indirect
|
|
go.etcd.io/etcd/api/v3 v3.5.5 // indirect
|
|
go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
|
|
go.etcd.io/etcd/client/v2 v2.305.5 // indirect
|
|
go.etcd.io/etcd/client/v3 v3.5.5 // indirect
|
|
go.etcd.io/etcd/pkg/v3 v3.5.5 // indirect
|
|
go.etcd.io/etcd/raft/v3 v3.5.5 // indirect
|
|
go.etcd.io/etcd/server/v3 v3.5.5 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.59.0 // indirect
|
|
go.opentelemetry.io/otel v1.34.0 // indirect
|
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.20.0 // indirect
|
|
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.20.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.34.0 // indirect
|
|
go.opentelemetry.io/otel/sdk v1.34.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.34.0 // indirect
|
|
go.opentelemetry.io/proto/otlp v1.0.0 // indirect
|
|
go.uber.org/atomic v1.11.0 // indirect
|
|
go.uber.org/automaxprocs v1.5.3 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
golang.org/x/crypto v0.45.0 // indirect
|
|
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect
|
|
golang.org/x/net v0.47.0 // indirect
|
|
golang.org/x/sync v0.18.0 // indirect
|
|
golang.org/x/sys v0.38.0 // indirect
|
|
golang.org/x/text v0.31.0 // indirect
|
|
golang.org/x/time v0.10.0 // indirect
|
|
google.golang.org/genproto v0.0.0-20250303144028-a0af3efb3deb // indirect
|
|
google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect
|
|
google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e // indirect
|
|
google.golang.org/protobuf v1.36.5 // indirect
|
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
|
gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
|
|
gopkg.in/yaml.v2 v2.4.0 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
k8s.io/apimachinery v0.32.3 // indirect
|
|
sigs.k8s.io/yaml v1.4.0 // indirect
|
|
)
|