mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 10:15:43 +00:00
## What was fixed This fixes import two-phase commit timestamp handling so imported segments keep the commit timestamp assigned by the import transaction instead of being made visible at an unrelated later timestamp. Changes included: - Preserve import commit timestamps in DataCoord segment metadata. - Broadcast import commit and rollback through DML channels so downstream consumers observe the 2PC result consistently. - Apply delete visibility in sealed segments based on the imported segment commit timestamp. - Carry the import transaction DML position needed for commit/rollback propagation. - Guard import in replicating clusters behind a disabled-by-default config switch, and only allow `auto_commit=false` when that switch is enabled. - Downgrade only unsupported `GetSalvageCheckpoint` errors for compatibility with older StreamingCoord implementations. - Move import jobs to `Committing` before handling per-vchannel commit acknowledgements, including the race where the vchannel commit is handled before the DDL ack callback. - Sync the generated `configs/milvus.yaml` entry for the new import replication guard. Fixes #48525 ## Test plan - `source ./scripts/setenv.sh && make SKIP_3RDPARTY=1 build-cpp-with-unittest` - `make build-go` - `make static-check` - `CLANG_FORMAT=/opt/homebrew/Caskroom/miniconda/base/envs/milvus2/bin/clang-format make cppcheck` - `make rustcheck` - `make fmt` - `go test ./cmd/tools/config -run TestYamlFile -count=1` - `go test -tags dynamic,test -gcflags="all=-N -l" ./internal/datacoord -run 'TestHandleCommitVchannel|TestCommitImportCallback' -count=1` - Local import commit timestamp tests under `~/workspace/snippets/tests/test_import_commit_ts`: - `test_import_delete.py` - `test_import_auto_commit.py` - `test_import_basic.py` - `test_import_mvcc.py` - `test_import_insert_delete.py` - `test_import_insert_delete_auto_id.py` - `test_import_ttl.py` - Local import + replication tests under `~/workspace/snippets/tests/test_cdc/import`. Local Python coverage used StorageV2. StorageV3 needs a separate run with `common.storage.useLoonFFI=true`. --------- Signed-off-by: Yihao Dai <yihao.dai@zilliz.com>