mirror of https://github.com/milvus-io/milvus.git
fix: Fix binlog import (#33027)
binlog import should only import into one partition. issue: https://github.com/milvus-io/milvus/issues/32807 --------- Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/33061/head
parent
3777eb2f68
commit
6fc00e42d7
|
@ -6083,12 +6083,12 @@ func (node *Proxy) ImportV2(ctx context.Context, req *internalpb.ImportRequest)
|
|||
return resp, nil
|
||||
}
|
||||
// Currently, Backup tool call import must with a partition name, each time restore a partition
|
||||
partitions, err := globalMetaCache.GetPartitions(ctx, req.GetDbName(), req.GetCollectionName())
|
||||
partitionID, err := globalMetaCache.GetPartitionID(ctx, req.GetDbName(), req.GetCollectionName(), req.GetPartitionName())
|
||||
if err != nil {
|
||||
resp.Status = merr.Status(err)
|
||||
return resp, nil
|
||||
}
|
||||
partitionIDs = lo.Values(partitions)
|
||||
partitionIDs = []UniqueID{partitionID}
|
||||
} else {
|
||||
if hasPartitionKey {
|
||||
if req.GetPartitionName() != "" {
|
||||
|
|
|
@ -800,7 +800,7 @@ class TestCreateImportJob(TestBase):
|
|||
|
||||
}
|
||||
if is_partition_key:
|
||||
payload["partitionName"] = "partition_0"
|
||||
payload["partitionName"] = "_default_0"
|
||||
rsp = self.import_job_client.create_import_jobs(payload)
|
||||
assert rsp['code'] == 200
|
||||
# list import job
|
||||
|
|
Loading…
Reference in New Issue