======================== CODE SNIPPETS ======================== TITLE: Start Milvus Standalone DESCRIPTION: Commands to start a Milvus standalone instance using Docker Compose and a start script. Assumes you are in the project root directory. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_18 LANGUAGE: shell CODE: ``` cd deployments/docker/dev docker compose up -d cd ../.. ./scripts/start_standalone.sh ``` ---------------------------------------- TITLE: Install OpenBLAS from Source DESCRIPTION: Provides instructions to download, compile, and install the OpenBLAS library from source code. This is an alternative to installing via apt. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_1 LANGUAGE: shell CODE: ``` $ wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz && \ $ tar zxvf v0.3.9.tar.gz && cd OpenBLAS-0.3.9 && \ $ make TARGET=CORE2 DYNAMIC_ARCH=1 DYNAMIC_OLDER=1 USE_THREAD=0 USE_OPENMP=0 FC=gfortran CC=gcc COMMON_OPT="-O3 -g -fPIC" FCOMMON_OPT="-O3 -g -fPIC -frecursive" NMAX="NUM_THREADS=128" LIBPREFIX="libopenblas" INTERFACE64=0 NO_STATIC=1 && \ $ make PREFIX=/usr install ``` ---------------------------------------- TITLE: Install Milvus Go SDK DESCRIPTION: Installs the latest version of the Milvus Go SDK and its dependencies using the go get command. SOURCE: https://github.com/milvus-io/milvus/blob/master/client/README.md#_snippet_0 LANGUAGE: shell CODE: ``` go get -u github.com/milvus-io/milvus/client/v2 ``` ---------------------------------------- TITLE: Start Milvus Cluster DESCRIPTION: Commands to start the Milvus cluster using Docker Compose. It includes navigating to the correct directory and executing the docker-compose up command. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_5 LANGUAGE: shell CODE: ``` cd [milvus project path]/deployments/docker/cluster docker-compose up -d docker compose up -d ``` LANGUAGE: shell CODE: ``` cd [milvus project path] ./scripts/start_cluster.sh ``` ---------------------------------------- TITLE: Install Docker Compose DESCRIPTION: Installs Docker Compose by downloading the binary and making it executable. It also creates a symbolic link for easier access. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_4 LANGUAGE: shell CODE: ``` sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose docker-compose --version docker compose --version ``` ---------------------------------------- TITLE: Local Test Setup for Milvus Benchmark DESCRIPTION: Steps to set up the milvus_benchmark tool for local testing, including setting the PYTHONPATH, preparing data by mounting a CIFS share, installing dependencies, installing the Milvus Python SDK, and running a test suite. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/benchmark/README.md#_snippet_0 LANGUAGE: bash CODE: ``` export PYTHONPATH=/your/project/path/milvus_benchmark sudo mount -t cifs -o username=test,vers=1.0 //172.16.70.249/test /test pip install -r requirements.txt cd milvus_benchmark/ && python main.py --local --host=* --port=19530 --suite=suites/2_insert_data.yaml ``` ---------------------------------------- TITLE: PyMilvus Test Environment Setup DESCRIPTION: This section details the steps to set up the PyMilvus test environment, including installing Python dependencies and configuring logging and test parameters. It assumes Python 3.8+ is installed. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README_CN.md#_snippet_1 LANGUAGE: shell CODE: ``` # Install Python dependencies pip install -r requirements.txt # Set custom log path (optional) export CI_LOG_PATH=/tmp/ci_logs/test/ # Example pytest.ini configuration for host and report path # addopts = --host *.*.*.* --html=/tmp/ci_logs/report.html # Execute test cases python3 -W ignore -m pytest ``` ---------------------------------------- TITLE: Deploy Milvus using Docker Compose DESCRIPTION: Start the Milvus services defined in your `docker-compose.yml` file in detached mode. This command initiates the Milvus deployment on your local machine or server using Docker Compose. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_42 LANGUAGE: shell CODE: ``` docker-compose -f docker-compose.yml up -d ``` ---------------------------------------- TITLE: Install Milvus Dependencies DESCRIPTION: Shell command to install all necessary dependencies for Milvus development from the repository root. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_5 LANGUAGE: bash CODE: ``` ./scripts/install_deps.sh ``` ---------------------------------------- TITLE: Install Compile Dependencies DESCRIPTION: Installs essential compile-time dependencies for Milvus using apt-get. It also sets the GO111MODULE environment variable and fetches a specific version of protoc-gen-go. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_0 LANGUAGE: shell CODE: ``` sudo apt install -y g++ gcc make libssl-dev zlib1g-dev libboost-regex-dev \ libboost-program-options-dev libboost-system-dev libboost-filesystem-dev \ libboost-serialization-dev python3-dev libboost-python-dev libcurl4-openssl-dev gfortran libtbb-dev export GO111MODULE=on go get github.com/golang/protobuf/protoc-gen-go@v1.3.2 ``` ---------------------------------------- TITLE: Start Milvus Cluster DESCRIPTION: Commands to start a Milvus cluster using Docker Compose and a start script. Assumes you are in the project root directory. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_17 LANGUAGE: shell CODE: ``` cd deployments/docker/dev docker compose up -d cd ../.. ./scripts/start_cluster.sh ``` ---------------------------------------- TITLE: MilvusDM Configuration Example: Milvus to HDF5 DESCRIPTION: Provides an example configuration for the M2H.yaml file, detailing parameters such as Milvus version, source Milvus path, MySQL connection details, source collection and partition names, and the directory for saving HDF5 files. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Migration.md#_snippet_1 LANGUAGE: yaml CODE: ``` M2H: milvus_version: 2.x source_milvus_path: '/home/user/milvus' mysql_parameter: host: '127.0.0.1' user: 'root' port: 3306 password: '123456' database: 'milvus' source_collection: # specify the 'partition_1' and 'partition_2' partitions of the 'test' collection. test: - 'partition_1' - 'partition_2' data_dir: '/home/user/data' ``` ---------------------------------------- TITLE: Milvus Migration: Specifying Namespace DESCRIPTION: This example shows how to specify a custom namespace for the Milvus installation when running the migration script. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_2 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 ``` ---------------------------------------- TITLE: Install Milvus with Docker Compose DESCRIPTION: Starts Milvus standalone or cluster deployment using Docker Compose. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_25 LANGUAGE: shell CODE: ``` $ docker-compose -f docker-compose.yml up -d ``` ---------------------------------------- TITLE: Install Milvus with Docker Compose DESCRIPTION: Starts Milvus services in detached mode using the specified `docker-compose.yml` file. This command is used after all Docker images have been loaded for an offline installation. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_7 LANGUAGE: shell CODE: ``` $ docker compose -f docker-compose.yml up -d ``` ---------------------------------------- TITLE: Milvus Migration: Basic Usage DESCRIPTION: This example demonstrates the basic usage of the Milvus migration script, specifying the Milvus instance name, source version, and target version. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_1 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -s 2.1.1 -t 2.2.0 ``` ---------------------------------------- TITLE: Integration Test Suite Structure DESCRIPTION: Example Go code demonstrating how to structure an integration test suite using the testify/suite framework and Milvus's MiniClusterSuite. This includes setting up and tearing down the test environment. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/integration/README.md#_snippet_4 LANGUAGE: go CODE: ``` import ( // ... "github.com/milvus-io/milvus/tests/integration" ) type NewSuite struct { integration.MiniClusterSuite } // Setups and teardowns, optional if no custom logic needed // example to suite setup & teardown, same logic applies to test setup&teardown func (s *NewSuite) SetupSuite() { s.MiniClusterSuite.SetupSuite() // customized setup } func (s *NewSuite) TearDownSuite() { s.MiniClusterSuite.TearDownSuite() // customized teardown } ``` ---------------------------------------- TITLE: Start Minikube Cluster DESCRIPTION: Initializes a local Kubernetes cluster using Minikube. This is a prerequisite for installing Milvus on Kubernetes. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_7 LANGUAGE: Shell CODE: ``` $ minikube start ``` ---------------------------------------- TITLE: Install Milvus Standalone with Docker Compose DESCRIPTION: This snippet shows how to download the Milvus standalone Docker Compose configuration file and start the Milvus service using Docker Compose. It also demonstrates how to check the running containers and stop the service. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_0 LANGUAGE: shell CODE: ``` wget https://github.com/milvus-io/milvus/releases/download/v2.0.0-rc6/milvus-standalone-docker-compose.yml -O docker-compose.yml docker-compose up -d ``` LANGUAGE: text CODE: ``` Docker Compose is now in the Docker CLI, try `docker compose up` Creating milvus-etcd ... done Creating milvus-minio ... done Creating milvus-standalone ... done ``` LANGUAGE: shell CODE: ``` sudo docker-compose ps Name Command State Ports ---------------------------------------------------------------------------------------------------------------- milvus-etcd etcd -listen-peer-urls=htt ... Up (healthy) 2379/tcp, 2380/tcp milvus-minio /usr/bin/docker-entrypoint ... Up (healthy) 9000/tcp milvus-standalone /tini -- milvus run standalone Up 0.0.0.0:19530->19530/tcp,:::19530->19530/tcp ``` LANGUAGE: shell CODE: ``` sudo docker-compose down sudo rm -rf volumes ``` ---------------------------------------- TITLE: Download Milvus Offline Installation Scripts DESCRIPTION: Downloads the `requirements.txt` and `save_image.py` scripts required for offline Milvus installation. These scripts are essential for managing Docker images during the offline setup process. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_0 LANGUAGE: shell CODE: ``` $ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/offline/requirements.txt $ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/offline/save_image.py ``` ---------------------------------------- TITLE: Start Milvus Cluster with Docker Compose DESCRIPTION: Starts the Milvus cluster services defined in the docker-compose.yml file in detached mode. This command initiates all Milvus components and their dependencies. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_3 LANGUAGE: Shell CODE: ``` $ docker-compose up -d ``` ---------------------------------------- TITLE: PyMilvus 对象初始化与日志处理 DESCRIPTION: 说明在测试用例文件中不应直接初始化 PyMilvus 对象,而是应调用封装好的方法。展示了如何通过 `self.init_partition_wrap()` 创建 partition 对象,以及直接使用 `self.partition_wrap`。 SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README_CN.md#_snippet_5 LANGUAGE: python CODE: ``` # create partition -Call the default initialization method partition_w = self.init_partition_wrap() assert partition_w.is_empty ``` LANGUAGE: python CODE: ``` # create partition -Directly call the encapsulated object self.partition_wrap.init_partition(collection=collection_name, name=partition_name) assert self.partition_wrap.is_empty ``` ---------------------------------------- TITLE: Install PyMilvus Test Prerequisites DESCRIPTION: Installs the necessary Python packages for the PyMilvus test framework from the requirements.txt file. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README.md#_snippet_1 LANGUAGE: bash CODE: ``` pip install -r requirements.txt ``` ---------------------------------------- TITLE: Get Kubernetes Pod Status for Milvus DESCRIPTION: This command lists the status of all pods in the current Kubernetes context. It is used to verify that the Milvus pods deployed by Helm are running correctly. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_29 LANGUAGE: Shell CODE: ``` kubectl get pods ``` ---------------------------------------- TITLE: Pull and Save Docker Images for Kubernetes Deployment DESCRIPTION: Install required Python dependencies and then execute a Python script to pull and save all Docker images referenced in the `milvus_manifest.yaml` file generated by Helm. This prepares images for deployment on Kubernetes. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_40 LANGUAGE: shell CODE: ``` pip3 install -r requirements.txt python3 save_image.py --manifest milvus_manifest.yaml ``` ---------------------------------------- TITLE: Start MinIO Service DESCRIPTION: Downloads, makes executable, and starts the MinIO service from a binary file. This service is used for object storage. The command starts the MinIO server with the specified data directory. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/binary/README.md#_snippet_1 LANGUAGE: shell CODE: ``` $ wget https://dl.min.io/server/minio/release/linux-amd64/minio $ chmod +x minio $ ./minio server /minio ``` ---------------------------------------- TITLE: Install Git Hooks DESCRIPTION: Installs the necessary git hooks for the project. This involves setting the GO111MODULE environment variable and fetching the git-hooks package using go get. SOURCE: https://github.com/milvus-io/milvus/blob/master/githooks/README.md#_snippet_0 LANGUAGE: shell CODE: ``` export GO111MODULE="on" go get -u github.com/git-hooks/git-hooks ``` ---------------------------------------- TITLE: Milvus YAML Configuration Example DESCRIPTION: An example YAML configuration file for Milvus, specifying etcd connection details. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/appendix_a_basic_components.md#_snippet_6 LANGUAGE: yaml CODE: ``` etcd: address: localhost port: 2379 rootpath: milvus/etcd ``` ---------------------------------------- TITLE: Install Dependencies and Save Docker Images (Docker Compose) DESCRIPTION: Installs Python dependencies using `requirements.txt` and then uses the `save_image.py` script to pull and save Milvus Docker images based on the provided `docker-compose.yml` manifest. This prepares the images for offline loading. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_2 LANGUAGE: shell CODE: ``` $ pip3 install -r requirements.txt $ python3 save_image.py --manifest docker-compose.yml ``` ---------------------------------------- TITLE: Milvus CreateCollectionReqTask Example DESCRIPTION: An example implementation of a task for creating a collection in Milvus. It wraps a `CreateCollectionRequest` proto and implements the `reqTask` interface. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/chap06_root_coordinator.md#_snippet_18 LANGUAGE: go CODE: ``` type CreateCollectionReqTask struct { baseReqTask Req *milvuspb.CreateCollectionRequest } // Task interfaces func (t *CreateCollectionReqTask) Ctx() context.Context func (t *CreateCollectionReqTask) Type() commonpb.MsgType func (t *CreateCollectionReqTask) Execute(ctx context.Context) error func (t *CreateCollectionReqTask) WaitToFinish() error func (t *CreateCollectionReqTask) Notify(err error) ``` ---------------------------------------- TITLE: MilvusDM Configuration Example: HDF5 to Milvus DESCRIPTION: Provides an example configuration for the H2M.yaml file, specifying parameters for migrating HDF5 data to Milvus. This includes data paths, Milvus connection details, migration mode, destination collection/partition names, and collection parameters like dimension and metric type. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Migration.md#_snippet_6 LANGUAGE: yaml CODE: ``` H2M: milvus-version: 2.x data_path: - /Users/zilliz/float_1.h5 - /Users/zilliz/float_2.h5 data_dir: dest_host: '127.0.0.1' dest_port: 19530 mode: 'overwrite' # 'skip/append/overwrite' dest_collection_name: 'test_float' dest_partition_name: 'partition_1' collection_parameter: dimension: 128 index_file_size: 1024 metric_type: 'L2' ``` ---------------------------------------- TITLE: Verify CMake Installation DESCRIPTION: Confirms that CMake, a cross-platform build system generator, is installed and meets the minimum required version (3.25 or higher) for building Milvus. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_7 LANGUAGE: shell CODE: ``` cmake --version ``` ---------------------------------------- TITLE: Install Milvus Cluster using Helm DESCRIPTION: This command deploys the Milvus cluster onto your Kubernetes environment using the specified Helm chart. 'my-release' is a user-defined name for this particular installation instance. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_28 LANGUAGE: Shell CODE: ``` helm install my-release milvus/milvus ``` ---------------------------------------- TITLE: Milvus CLI Usage DESCRIPTION: Demonstrates the basic syntax for running Milvus commands from the command line, including specifying the command, server type, and flags. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/appendix_c_system_configurations.md#_snippet_0 LANGUAGE: shell CODE: ``` $ milvus [command] [server type] [flags] Example: $ MILVUS_CONFIG_FILE=/path/to/milvus/configs/milvus.yaml milvus run rootcoord ``` ---------------------------------------- TITLE: Milvus Migration: Rollback and Re-migrate DESCRIPTION: This example demonstrates the process of rolling back to an older version and then re-migrating to the target version if an error occurs during the initial migration. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_6 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev -o rollback -w ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev -o migrate -w ``` ---------------------------------------- TITLE: Milvus Installation Links DESCRIPTION: Provides direct links for downloading and installing Milvus on different operating systems: Windows, Mac, and Linux. These links are typically to the project's repository or download pages. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Home.md#_snippet_0 LANGUAGE: html CODE: ```       Milvus for Windows       Milvus for Mac       Milvus for Linux ``` ---------------------------------------- TITLE: Jemalloc Configure Command Setup DESCRIPTION: Sets up the base configure command for jemalloc, including the installation prefix, library directory, and static library path. It also appends platform-specific options like SDKROOT for macOS and page size for AArch64. SOURCE: https://github.com/milvus-io/milvus/blob/master/internal/core/thirdparty/jemalloc/CMakeLists.txt#_snippet_2 LANGUAGE: cmake CODE: ``` set(JEMALLOC_PREFIX "${CMAKE_INSTALL_PREFIX}") set(JEMALLOC_LIB_DIR "${JEMALLOC_PREFIX}/lib") set(JEMALLOC_STATIC_LIB "${JEMALLOC_LIB_DIR}/libjemalloc_pic${CMAKE_STATIC_LIBRARY_SUFFIX}") set(JEMALLOC_CONFIGURE_COMMAND ./configure "AR=${CMAKE_AR}" "CC=${CMAKE_C_COMPILER}") message("CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT}") if (CMAKE_OSX_SYSROOT) list(APPEND JEMALLOC_CONFIGURE_COMMAND "SDKROOT=${CMAKE_OSX_SYSROOT}") endif () if (DEFINED __AARCH64) #aarch64 platform use 64k pagesize. list(APPEND JEMALLOC_CONFIGURE_COMMAND "--with-lg-page=16") endif () list(APPEND JEMALLOC_CONFIGURE_COMMAND "--prefix=${JEMALLOC_PREFIX}" "--libdir=${JEMALLOC_LIB_DIR}" "--enable-prof") if (CMAKE_BUILD_TYPE EQUAL "DEBUG") # Enable jemalloc debug checks when Milvus itself has debugging enabled list(APPEND JEMALLOC_CONFIGURE_COMMAND "--enable-debug") endif () ``` ---------------------------------------- TITLE: Milvus LoadYaml Example DESCRIPTION: Demonstrates how the LoadYaml method in Milvus's BaseTable parses a YAML file into key-value pairs. The example shows a simple YAML configuration for etcd and the resulting key-value pairs stored in the params. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/appendix_a_basic_components.md#_snippet_5 LANGUAGE: go CODE: ``` "etcd.address" -> "localhost" "etcd.port" -> "2379" "etcd.rootpath" -> "milvus/etcd" ``` ---------------------------------------- TITLE: Start Milvus Standalone Service DESCRIPTION: This snippet navigates to the Milvus directory, sets the `LD_LIBRARY_PATH` to include the Milvus libraries, and then starts the Milvus service in standalone mode. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/binary/README.md#_snippet_4 LANGUAGE: shell CODE: ``` cd milvus export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib ./bin/milvus run standalone ``` ---------------------------------------- TITLE: Generate Go Files from Proto DESCRIPTION: Command to generate Go language files from Protocol Buffer definitions, a crucial step in the Milvus build process. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_2 LANGUAGE: shell CODE: ``` make check-proto-product ``` ---------------------------------------- TITLE: Verify Go Installation DESCRIPTION: Checks if the Go programming language environment is set up correctly, including verifying the Go version (>= 1.22). It also emphasizes the importance of correctly configured GOPATH and GOBIN environment variables. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_9 LANGUAGE: shell CODE: ``` go version ``` ---------------------------------------- TITLE: Milvus PySDK 封装类初始化 DESCRIPTION: 展示了 `base/client_base.py` 文件中 `Base` 类 `setup` 方法内对 Milvus PySDK 各封装类的初始化,包括 `ApiConnectionsWrapper`, `ApiUtilityWrapper`, `ApiCollectionWrapper`, `ApiPartitionWrapper`, `ApiIndexWrapper`, `ApiCollectionSchemaWrapper`, `ApiFieldSchemaWrapper`。 SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README_CN.md#_snippet_9 LANGUAGE: python CODE: ``` self.connection_wrap = ApiConnectionsWrapper() self.utility_wrap = ApiUtilityWrapper() self.collection_wrap = ApiCollectionWrapper() self.partition_wrap = ApiPartitionWrapper() self.index_wrap = ApiIndexWrapper() self.collection_schema_wrap = ApiCollectionSchemaWrapper() self.field_schema_wrap = ApiFieldSchemaWrapper() ``` ---------------------------------------- TITLE: Start Dependent Services DESCRIPTION: Command to start the necessary external services (etcd, minio, pulsar) using Docker Compose. These services are required for the integration tests to run. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/integration/README.md#_snippet_1 LANGUAGE: bash CODE: ``` cd [milvus-folder]/deployments/docker/dev && docker compose up -d ``` ---------------------------------------- TITLE: Obtain Milvus Binary and Start Service DESCRIPTION: Retrieves the Milvus standalone binary from a Docker image and then starts the Milvus service. This involves copying the binary from a running Docker container and executing the Milvus standalone startup script. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/binary/README.md#_snippet_2 LANGUAGE: shell CODE: ``` $ docker run -d --name milvus milvusdb/milvus:v2.5.15 /bin/bash $ docker cp milvus:/milvus . $ cd milvus $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/lib $ ./bin/milvus run standalone ``` ---------------------------------------- TITLE: Load Docker Images for Offline Installation DESCRIPTION: Loads the previously saved Docker images (`.tar.gz` files) into the Docker environment. This command iterates through all `.tar.gz` files in the `./images/` directory, unzips them, and loads them using `docker load`. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_6 LANGUAGE: shell CODE: ``` $ for image in $(find . -type f -wholename "./images/*.tar.gz") ; do gunzip -c $image | docker load; done; ``` ---------------------------------------- TITLE: Initialize Milvus Client DESCRIPTION: Demonstrates how to initialize a Milvus client in Go, establishing a connection to the Milvus server. It includes setting up a context and handling potential connection errors. SOURCE: https://github.com/milvus-io/milvus/blob/master/client/README.md#_snippet_1 LANGUAGE: go CODE: ``` import "github.com/milvus-io/milvus/client/v2/milvusclient" import "context" //... 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 ``` ---------------------------------------- TITLE: Download Milvus Docker Compose Configuration DESCRIPTION: Download the `docker-compose.yml` file for either a standalone or cluster Milvus deployment from the official Milvus GitHub repository. Choose the appropriate configuration based on your deployment needs. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_36 LANGUAGE: shell CODE: ``` wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/standalone/docker-compose.yml -O docker-compose.yml ``` LANGUAGE: shell CODE: ``` wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/cluster/docker-compose.yml -O docker-compose.yml ``` ---------------------------------------- TITLE: Pull and Save Docker Images for Docker Compose Deployment DESCRIPTION: Install required Python dependencies and then execute a Python script to pull and save all Docker images specified in the `docker-compose.yml` file. This step is crucial for environments with restricted internet access or for image portability. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_37 LANGUAGE: shell CODE: ``` pip3 install -r requirements.txt python3 save_image.py --manifest docker-compose.yml ``` ---------------------------------------- TITLE: Start etcd Service DESCRIPTION: Downloads, extracts, and starts the etcd service from a binary file. Requires wget and tar. The etcd service is configured to listen on port 2379. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/binary/README.md#_snippet_0 LANGUAGE: shell CODE: ``` $ wget https://github.com/etcd-io/etcd/releases/download/v3.5.0/etcd-v3.5.0-linux-amd64.tar.gz $ tar zxvf etcd-v3.5.0-linux-amd64.tar.gz $ cd etcd-v3.5.0-linux-amd64 $ ./etcd -advertise-client-urls=http://127.0.0.1:2379 -listen-client-urls http://0.0.0.0:2379 --data-dir /etcd ``` ---------------------------------------- TITLE: Install Milvus Dependencies DESCRIPTION: Installs essential system libraries required for Milvus to run. These include libraries for optimized mathematical operations and threading. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/binary/README.md#_snippet_3 LANGUAGE: shell CODE: ``` $ sudo apt-get install libopenblas-dev $ sudo apt-get install libgomp1 $ sudo apt-get install libtbb2 ``` ---------------------------------------- TITLE: Install Conan Package Manager DESCRIPTION: Installs the Conan C++ package manager, which Milvus uses for managing third-party dependencies. It specifies a required version (1.64.1) and notes that 2.x is not supported. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_8 LANGUAGE: shell CODE: ``` pip install conan==1.64.1 ``` ---------------------------------------- TITLE: Run Milvus Unit Tests DESCRIPTION: Commands to execute unit tests for Milvus. Supports running all tests (Go and C++) or specific language tests. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_6 LANGUAGE: shell CODE: ``` make unittest ``` LANGUAGE: shell CODE: ``` make test-go ``` LANGUAGE: shell CODE: ``` make test-cpp ``` ---------------------------------------- TITLE: Get E2E Test Help DESCRIPTION: Displays the help message for the E2E test script, providing information on available options and usage. This is useful for understanding the script's capabilities and customizing test runs. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/README_CN.md#_snippet_3 LANGUAGE: shell CODE: ``` $ ./e2e-k8s.sh --help ``` ---------------------------------------- TITLE: Compile Milvus DESCRIPTION: The primary command to compile the Milvus project. SOURCE: https://github.com/milvus-io/milvus/blob/master/scripts/README.md#_snippet_3 LANGUAGE: shell CODE: ``` make milvus ``` ---------------------------------------- TITLE: Milvus Migration: Specifying External Etcd Service DESCRIPTION: This example demonstrates how to provide the endpoints for an external Etcd service used by Milvus, which is necessary if Milvus is not using the default embedded Etcd. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_8 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.4 -t 2.2.0 -e ``` ---------------------------------------- TITLE: Milvus Migration: Specifying Image Tag DESCRIPTION: This example illustrates how to specify a custom Milvus image tag for the migration process. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_4 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev -w milvusdb/milvus:master-20221016-15878781 ``` ---------------------------------------- TITLE: Using the WAL Service DESCRIPTION: Provides an example of how to use the WAL service by obtaining a builder from the registry, building an opener, and then opening a WAL instance for a specific channel. Error handling is included. SOURCE: https://github.com/milvus-io/milvus/blob/master/internal/streamingnode/server/wal/README.md#_snippet_1 LANGUAGE: go CODE: ``` import "github.com/milvus-io/milvus/internal/streamingnode/server/wal/registry" name := "your builder name" var yourCh *options.PChannelInfo opener, err := registry.MustGetBuilder(name).Build() if err != nil { panic(err) } ctx := context.Background() logger, err := opener.Open(ctx, wal.OpenOption{ Channel: yourCh }) if err != nil { panic(err) } ``` ---------------------------------------- TITLE: Start Milvus Standalone for E2E Tests DESCRIPTION: Starts a standalone Milvus instance using Docker Compose, preparing the environment for end-to-end tests. It sets up necessary paths and starts the service. SOURCE: https://github.com/milvus-io/milvus/blob/master/build/README.md#_snippet_9 LANGUAGE: shell CODE: ``` cd deployments/docker/dev docker compose up -d cd ../../../ build/builder.sh /bin/bash -c "export ROCKSMQ_PATH='/tmp/milvus/rdb_data' && ./scripts/start_standalone.sh && cat" ``` ---------------------------------------- TITLE: Download Docker Compose for Milvus DESCRIPTION: Downloads the `docker-compose.yml` file for either Milvus standalone or cluster deployment. This file defines the services and configurations needed to run Milvus using Docker Compose. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_1 LANGUAGE: shell CODE: ``` $ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/standalone/docker-compose.yml -O docker-compose.yml # or download Milvus cluster docker-compose.yml $ wget https://raw.githubusercontent.com/milvus-io/milvus/master/deployments/docker/cluster/docker-compose.yml -O docker-compose.yml ``` ---------------------------------------- TITLE: Running Milvus Go Client Tests with Go DESCRIPTION: Provides common commands for running tests using the Go testing framework. Includes options for running all tests, specific tests, and tests with verbose output. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/go_client/README.md#_snippet_6 LANGUAGE: bash CODE: ``` # Run all tests go test ./testcases/... # Run specific test go test -run TestYourFeature ./testcases/ # Run with verbose output go test -v ./testcases/... ``` ---------------------------------------- TITLE: Kubernetes Pod Status Log for Milvus Cluster DESCRIPTION: This output displays the readiness and status of the Milvus-related pods within the Kubernetes cluster. It confirms that all components of the Milvus deployment are running and healthy. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_30 LANGUAGE: Text CODE: ``` NAME READY STATUS RESTARTS AGE my-release-etcd-0 1/1 Running 0 33s my-release-milvus-datacoord-574b99bbb7-t898f 1/1 Running 0 33s my-release-milvus-datanode-54568fc948-9rwbk 1/1 Running 0 33s my-release-milvus-indexcoord-576b44d56-wh6vk 1/1 Running 0 33s my-release-milvus-indexnode-67ff57745f-7lml8 1/1 Running 0 33s my-release-milvus-proxy-55f98ffbbb-r68qt 1/1 Running 0 33s my-release-milvus-pulsar-6475b86778-68r4l 1/1 Running 0 33s my-release-milvus-querycoord-74d8895985-m5sdr 1/1 Running 0 33s my-release-milvus-querynode-68486d847c-q5fg7 1/1 Running 0 33s my-release-milvus-rootcoord-746d8b5b99-2strx 1/1 Running 0 33s my-release-minio-68bbbf8459-2qxwv 1/1 Running 0 33s ``` ---------------------------------------- TITLE: Milvus Build Environment Requirements DESCRIPTION: Specifies the minimum required versions for Docker and Docker Compose to build Milvus. Includes links to installation guides. SOURCE: https://github.com/milvus-io/milvus/blob/master/build/README.md#_snippet_2 LANGUAGE: APIDOC CODE: ``` Docker: Version: 19.03 or higher Installation: https://docs.docker.com/get-docker/ Docker Compose: Version: 1.25.1 or higher Installation: https://docs.docker.com/compose/install/ ``` ---------------------------------------- TITLE: Running Milvus Go Client Tests with Gotestsum DESCRIPTION: Demonstrates how to use gotestsum for running tests, including commands for executing all default cases and running tests from specified files, with options for output formatting and verbosity. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/go_client/README.md#_snippet_7 LANGUAGE: bash CODE: ``` # gotestsum Recommend you to use gotestsum https://github.com/gotestyourself/gotestsum # Run all default cases gotestsum --format testname --hide-summary=output -v ./testcases/... --addr=127.0.0.1:19530 -timeout=30m # Run a specified file gotestsum --format testname --hide-summary=output ./testcases/collection_test.go ./testcases/main_test.go --addr=127.0.0.1:19530 ``` ---------------------------------------- TITLE: Milvus Migration: Specifying Root Path DESCRIPTION: This example demonstrates how to specify a custom root path for Milvus meta when executing the migration script. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_3 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -r by-dev ``` ---------------------------------------- TITLE: Go: Example Implementation of RootCoord Task Interface DESCRIPTION: Illustrates an example implementation of the `reqTask` interface using `CreateCollectionReqTask`. This struct wraps a `CreateCollectionRequest` and declares the methods required by the task interface for processing collection creation requests. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/chap06_root_coordinator.md#_snippet_37 LANGUAGE: Go CODE: ``` type CreateCollectionReqTask struct { baseReqTask Req *milvuspb.CreateCollectionRequest } // Task interfaces func (t *CreateCollectionReqTask) Ctx() context.Context func (t *CreateCollectionReqTask) Type() commonpb.MsgType func (t *CreateCollectionReqTask) Execute(ctx context.Context) error func (t *CreateCollectionReqTask) WaitToFinish() error func (t *CreateCollectionReqTask) Notify(err error) ``` ---------------------------------------- TITLE: Load Saved Docker Images into Docker Daemon DESCRIPTION: Navigate to the directory where Docker images were saved and load all gzipped image archives into the local Docker daemon. This makes the images available for use by Docker Compose or Kubernetes. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_41 LANGUAGE: shell CODE: ``` cd images/ for image in $(find . -type f -name "*.tar.gz") ; do gunzip -c $image | docker load; done ``` ---------------------------------------- TITLE: Milvus Linux Prerequisites DESCRIPTION: Software prerequisites for Milvus development on Linux systems, including recommended versions for Go, CMake, GCC, and Conan. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_2 LANGUAGE: text CODE: ``` go: >= 1.21 cmake: >= 3.18 gcc: 7.5 conan: 1.61 ``` ---------------------------------------- TITLE: Run Milvus E2E Tests DESCRIPTION: Steps to prepare and run End-to-End tests using the Python client. This involves navigating to the test directory, installing dependencies, and executing pytest with specific tags and parallelization. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_19 LANGUAGE: shell CODE: ``` cd tests/python_client pip install -r requirements.txt pytest --tags=L0 -n auto ``` ---------------------------------------- TITLE: Milvus Migration: Automatic Cleanup DESCRIPTION: This example shows how to enable automatic cleanup of the migration pod after the migration is successfully completed by setting the `-d` flag to `true`. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/migrate-meta/README.md#_snippet_5 LANGUAGE: shell CODE: ``` ./migrate.sh -i my-release -n milvus -s 2.1.1 -t 2.2.0 -w milvusdb/milvus:master-20221016-15878781 -d true ``` ---------------------------------------- TITLE: Verify Milvus Pods Status (Kubernetes) DESCRIPTION: Lists all pods in the Kubernetes cluster and their status. This command is used to verify that all Milvus components have started successfully and are in a 'Running' state. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_11 LANGUAGE: Kubernetes CODE: ``` $ kubectl get pods ``` ---------------------------------------- TITLE: Milvus GitHub Workflow Example DESCRIPTION: Demonstrates the essential Git commands for setting up a local development environment by forking the Milvus repository, fetching upstream changes, creating a new branch, and preparing for development. SOURCE: https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#_snippet_6 LANGUAGE: shell CODE: ``` git remote add upstream git@github.com:milvus-io/milvus.git git fetch upstream git checkout upstream/master -b my-topic-branch ``` ---------------------------------------- TITLE: Start Milvus Cluster for E2E Tests DESCRIPTION: Starts a Milvus cluster instance using Docker Compose, preparing the environment for end-to-end tests. SOURCE: https://github.com/milvus-io/milvus/blob/master/build/README.md#_snippet_10 LANGUAGE: shell CODE: ``` build/builder.sh /bin/bash -c "./scripts/start_cluster.sh && cat" ``` ---------------------------------------- TITLE: Configure Milvus build for custom memory page size DESCRIPTION: Shows how to modify the 'core_build.sh' script to configure CMAKE_CMD for jemalloc with MILVUS_JEMALLOC_LG_PAGE, optimizing memory management for systems with large page sizes (e.g., 64KB). The provided snippet is a partial example of the CMAKE_CMD definition. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_31 LANGUAGE: bash CODE: ``` arch=$(uname -m) CMAKE_CMD="cmake \ ${CMAKE_EXTRA_ARGS} \ -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \ -DCMAKE_LIBRARY_ARCHITECTURE=${arch} \ -DBUILD_COVERAGE=${BUILD_COVERAGE} \ -DMILVUS_GPU_VERSION=${GPU_VERSION} \ -DMILVUS_CUDA_ARCH=${CUDA_ARCH} \ -DEMBEDDED_MILVUS=${EMBEDDED_MILVUS} \ ``` ---------------------------------------- TITLE: Start Milvus Dev Container DESCRIPTION: Starts the Milvus development environment using a shell script. This command brings up necessary services like Jaeger, Minio, Pulsar, and etcd. SOURCE: https://github.com/milvus-io/milvus/blob/master/build/README.md#_snippet_3 LANGUAGE: shell CODE: ``` #!/bin/bash ./scripts/devcontainer.sh up ``` ---------------------------------------- TITLE: Install PyMilvus SDK DESCRIPTION: Installs the PyMilvus SDK, the Python client for Milvus. This is the first step to interact with Milvus using Python. SOURCE: https://github.com/milvus-io/milvus/blob/master/README.md#_snippet_0 LANGUAGE: bash CODE: ``` pip install -U pymilvus ``` ---------------------------------------- TITLE: Benchmarking Executable Configuration DESCRIPTION: Defines source files for benchmarking and links them to necessary libraries. This includes setting up executables like 'all_bench' and 'indexbuilder_bench', specifying their source files, and linking them with core Milvus libraries, the Knowhere library, pthreads, and the benchmark_main library. SOURCE: https://github.com/milvus-io/milvus/blob/master/internal/core/unittest/bench/CMakeLists.txt#_snippet_0 LANGUAGE: cmake CODE: ``` include_directories(${CMAKE_HOME_DIRECTORY}/src) include_directories(${CMAKE_HOME_DIRECTORY}/unittest) set(bench_srcs bench_naive.cpp bench_search.cpp ) set(indexbuilder_bench_srcs bench_indexbuilder.cpp ) add_executable(all_bench ${bench_srcs}) target_link_libraries(all_bench milvus_core knowhere pthread ) target_link_libraries(all_bench benchmark_main) add_executable(indexbuilder_bench ${indexbuilder_bench_srcs}) target_link_libraries(indexbuilder_bench milvus_core knowhere pthread ) target_link_libraries(indexbuilder_bench benchmark_main) ``` ---------------------------------------- TITLE: 封装方法参数说明 DESCRIPTION: 说明了调用被测试接口时,除了 `check_task` 和 `check_items` 参数外,其余参数与 PyMilvus 原生接口参数一致。展示了 `init_partition` 方法的签名。 SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README_CN.md#_snippet_10 LANGUAGE: python CODE: ``` def init_partition(self, collection, name, description="", check_task=None, check_items=None, **kwargs) ``` ---------------------------------------- TITLE: Initialize and Check Partition DESCRIPTION: Initializes a partition and checks if it is empty. This is a basic setup for partition operations. SOURCE: https://github.com/milvus-io/milvus/blob/master/tests/python_client/README.md#_snippet_5 LANGUAGE: python CODE: ``` self.partition_wrap.init_partition(collection=collection_name, name=partition_name) assert self.partition_wrap.is_empty ``` ---------------------------------------- TITLE: Milvus Configuration File Parameters DESCRIPTION: Provides a description of parameters configurable via the `milvus.yaml` file, covering service endpoints, logging settings, and message channel configurations. SOURCE: https://github.com/milvus-io/milvus/blob/master/docs/developer_guides/appendix_c_system_configurations.md#_snippet_2 LANGUAGE: APIDOC CODE: ``` etcd.endpoints: "localhost:2379" - etcd service endpoints. minio.address: "localhost" - minio service address. minio.port: 9000 - minio service port. pulsar.address: "localhost" - pulsar service address. pulsar.port: 6650 - pulsar service port. log.level: "info" - Specifies the log output level. Supported levels: debug, info, warning, error. - Default: "info" log.format: "text" - Specifies the log output format. Supported formats: text, json. - Default: "text" log.file.rootPath: "/var/lib/milvus/logs" - Specifies the log storage path. - Default: "/var/lib/milvus/logs" log.file.maxSize: 300MB - Log file size limit. log.file.maxAge: 0 - Maximum number of days to retain log files. 0 means no cleanup. log.file.maxBackups: 0 - Maximum number of old log files to retain. 0 means retain all. msgChannel.chanNamePrefix.cluster: "by-dev" - Specifies the topic prefix in Pulsar. ``` ---------------------------------------- TITLE: Install Milvus on Kubernetes DESCRIPTION: Applies the generated Kubernetes manifests (`milvus_manifest.yaml`) to deploy Milvus on a Kubernetes cluster. This command is used after loading the Docker images for a Kubernetes-based offline installation. SOURCE: https://github.com/milvus-io/milvus/blob/master/deployments/offline/README.md#_snippet_8 LANGUAGE: shell CODE: ``` $ kubectl apply -f milvus_manifest.yaml ``` ---------------------------------------- TITLE: Milvus Hardware Requirements DESCRIPTION: Recommended hardware specifications for building and running Milvus from source code. This includes RAM and free disk space. SOURCE: https://github.com/milvus-io/milvus/blob/master/DEVELOPMENT.md#_snippet_0 LANGUAGE: yaml CODE: ``` - 8GB of RAM - 50GB of free disk space ``` ---------------------------------------- TITLE: Run Git Hooks Installation DESCRIPTION: Executes the git hooks installation command after the package has been retrieved. This command enables the git hooks for the current repository. SOURCE: https://github.com/milvus-io/milvus/blob/master/githooks/README.md#_snippet_1 LANGUAGE: shell CODE: ``` git hooks install ``` ---------------------------------------- TITLE: Deploy Milvus on Kubernetes Cluster DESCRIPTION: Apply the generated Kubernetes manifest file (`milvus_manifest.yaml`) to your Kubernetes cluster. This command creates all the necessary resources to run Milvus within your Kubernetes environment. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Installation.md#_snippet_43 LANGUAGE: shell CODE: ``` kubectl apply -f milvus_manifest.yaml ``` ---------------------------------------- TITLE: Milvus 1.x to 2.0 Migration Configuration (M2M.yaml) DESCRIPTION: Example configuration for migrating data from Milvus 1.x to Milvus 2.0 using MilvusDM. It includes source Milvus path, MySQL parameters (if applicable), source collection/partition details, destination Milvus connection details, and migration mode. SOURCE: https://github.com/milvus-io/milvus/blob/master/__wiki__/Migration.md#_snippet_16 LANGUAGE: yaml CODE: ``` M2M: milvus_version: 2.x source_milvus_path: '/home/user/milvus' mysql_parameter: host: '127.0.0.1' user: 'root' port: 3306 password: '123456' database: 'milvus' source_collection: test: - 'partition_1' - 'partition_2' dest_host: '127.0.0.1' dest_port: 19530 mode: 'skip' # 'skip/append/overwrite' ```