milvus-io / milvus

A cloud-native vector database, storage for next generation AI applications
https://milvus.io
Apache License 2.0
30.07k stars 2.88k forks source link

[Bug]: Rename collection failed when the collection does not belong to the default database #27385

Closed StormstoutY closed 10 months ago

StormstoutY commented 1 year ago

Is there an existing issue for this?

Environment

- Milvus version:2.2.13
- Deployment mode(standalone or cluster): cluster
- MQ type(rocksmq, pulsar or kafka):    
- SDK version(e.g. pymilvus v2.0.0rc2):
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

I use the follewing code to rename a collection in the database "default2":

connections.connect(host=HOST, port=PORT)
databases = db.list_database()

if user not in databases:
    # print(f"User '{user}' does not exist.")
    database = db.create_database(user)

connections.connect(db_name=user, host=HOST, port=PORT)

has = utility.has_collection(dataset_name)

if not has:
    raise Exception(f"The user does not have a collection named {dataset_name}")
dataset_name = "test1"
newName = "test2"
collection = Collection(dataset_name)

print(collection.num_entities)

if newName != "Null":
    utility.rename_collection(dataset_name, newName)
    dataset_name = newName

and the collection is an empty collection. After renaming the collection, I found that no matter whether I use the old name or the new name, I can't connect to the collection. And when i use utility.list_collections() to list the collectiions, I got an empty list.

Then when I recreate a new collection, and try to rename it to the new name I had before, I got the error: <MilvusException: (code=1, message=duplicated new collection name :test2 with other collection name or alias)>

And after sometime, when I list the collections in the database "default", I found the collection I have renamed in the database "default2"

I wonder how did this happen ? Why are collections moved between different databases?

Expected Behavior

No response

Steps To Reproduce

No response

Milvus Log

[2023/09/26 11:51:47.298 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=7bf78c2f582dfa97] [role=proxy] [db=default2] [collection=test1]

[2023/09/26 11:51:47.299 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=7bf78c2f582dfa97] [role=proxy] [msgID=444525211098808321] [BeginTS=444525211098808321] [EndTS=444525211098808321] [db=default2] [collection=test1]

[2023/09/26 11:51:47.299 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=7bf78c2f582dfa97] [role=proxy] [msgID=444525211098808321] [BeginTS=444525211098808321] [EndTS=444525211098808321] [db=default2] [collection=test1]

[2023/09/26 11:51:49.186 +00:00] [INFO] [proxy/impl.go:5145] ["received rename collection request"] [traceID=5f5a37f685210e43] [role=proxy] [oldName=test1] [newName=test2]

[2023/09/26 11:51:49.187 +00:00] [INFO] [proxy/impl.go:114] ["received request to invalidate collection meta cache"] [traceID=5f5a37f685210e43] [module=Proxy] [role=proxy] [db=default2] [collectionName=test1] [collectionID=0]

[2023/09/26 11:51:49.187 +00:00] [INFO] [proxy/impl.go:141] ["complete to invalidate collection meta cache"] [traceID=5f5a37f685210e43] [module=Proxy] [role=proxy] [db=default2] [collection=test1] [collectionID=0]

[2023/09/26 11:51:49.187 +00:00] [WARN] [retry/retry.go:44] ["retry func failed"] ["retry time"=0] [error="duplicated new collection name :test2 with other collection name or alias"]

[2023/09/26 11:51:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:51:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:52:22.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:52:22.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:52:52.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:54:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:54:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:54:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:54:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:55:22.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:55:22.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:55:52.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:55:52.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:56:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:56:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:56:52.351 +00:00] [INFO] [proxy/impl.go:5576] ["connect received"] [traceID=7c8df8a9d8b5321a] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:56:52.377390"] [user=] [host=test.com] [db=default]

[2023/09/26 11:56:52.351 +00:00] [INFO] [proxy/client_info.go:45] ["client register"] [traceID=7c8df8a9d8b5321a] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:56:52.377390"] [user=] [host=test.com] [identifier=444525291065835522] [last_active_time=2023/09/26 11:56:52.351 +00:00] [db=default]

[2023/09/26 11:56:52.374 +00:00] [INFO] [proxy/impl.go:278] ["ListDatabases received"] [traceID=2e318749e75bd5c7] [role=proxy]

[2023/09/26 11:56:52.374 +00:00] [INFO] [proxy/impl.go:290] ["ListDatabases enqueued"] [traceID=2e318749e75bd5c7] [role=proxy]

[2023/09/26 11:56:52.375 +00:00] [INFO] [proxy/impl.go:301] ["ListDatabases done"] [traceID=2e318749e75bd5c7] [role=proxy] ["num of db"=2]

[2023/09/26 11:56:52.397 +00:00] [INFO] [proxy/impl.go:1084] ["ShowCollections received"] [role=proxy] [DbName=default] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:56:52.397 +00:00] [INFO] [proxy/impl.go:1112] ["ShowCollections enqueued"] [role=proxy] [MsgID=444525291078942723] [DbName=default] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:56:52.398 +00:00] [INFO] [proxy/impl.go:1143] ["ShowCollections Done"] [role=proxy] [MsgID=444525291078942723] [DbName=default] [TimeStamp=0] [ShowType=All] [len(CollectionNames)=0] [num_collections=5]

[2023/09/26 11:56:52.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:56:52.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:57:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[test1,hello_milvus2]"]

[2023/09/26 11:57:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:57:24.585 +00:00] [INFO] [proxy/client_info.go:49] ["client deregister"] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-25 19:56:21.805380"] [user=] [host=test.com] [identifier=444502633815736325] [last_active_time=2023/09/25 11:56:25.255 +00:00]

[2023/09/26 11:57:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,test1]"]

[2023/09/26 11:57:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:58:05.359 +00:00] [INFO] [proxy/impl.go:5576] ["connect received"] [traceID=1eae6d85b07f4632] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:58:05.389595"] [user=] [host=test.com] [db=default]

[2023/09/26 11:58:05.360 +00:00] [INFO] [proxy/client_info.go:45] ["client register"] [traceID=1eae6d85b07f4632] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:58:05.389595"] [user=] [host=test.com] [identifier=444525310202347522] [last_active_time=2023/09/26 11:58:05.360 +00:00] [db=default]

[2023/09/26 11:58:05.372 +00:00] [INFO] [proxy/impl.go:278] ["ListDatabases received"] [traceID=7ad03e1b645ce089] [role=proxy]

[2023/09/26 11:58:05.373 +00:00] [INFO] [proxy/impl.go:290] ["ListDatabases enqueued"] [traceID=7ad03e1b645ce089] [role=proxy]

[2023/09/26 11:58:05.373 +00:00] [INFO] [proxy/impl.go:301] ["ListDatabases done"] [traceID=7ad03e1b645ce089] [role=proxy] ["num of db"=2]

[2023/09/26 11:58:05.395 +00:00] [INFO] [proxy/impl.go:1084] ["ShowCollections received"] [role=proxy] [DbName=default] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:58:05.395 +00:00] [INFO] [proxy/impl.go:1112] ["ShowCollections enqueued"] [role=proxy] [MsgID=444525310215192579] [DbName=default] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:58:05.396 +00:00] [INFO] [proxy/impl.go:1143] ["ShowCollections Done"] [role=proxy] [MsgID=444525310215192579] [DbName=default] [TimeStamp=0] [ShowType=All] [len(CollectionNames)=0] [num_collections=5]

[2023/09/26 11:58:05.408 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=28eabc2ad18bb252] [role=proxy] [db=default] [collection=test1]

[2023/09/26 11:58:05.409 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=28eabc2ad18bb252] [role=proxy] [MsgID=444525310215192582] [BeginTS=444525310215192582] [EndTS=444525310215192582] [db=default] [collection=test1]

[2023/09/26 11:58:05.409 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=28eabc2ad18bb252] [role=proxy] [MsgID=444525310215192582] [BeginTS=444525310215192582] [EndTS=444525310215192582] [db=default] [collection=test1]

[2023/09/26 11:58:05.422 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=70decb3a6b377e6e] [role=proxy] [db=default] [collection=test1]

[2023/09/26 11:58:05.422 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=70decb3a6b377e6e] [role=proxy] [MsgID=444525310215192584] [BeginTS=444525310215192584] [EndTS=444525310215192584] [db=default] [collection=test1]

[2023/09/26 11:58:05.422 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=70decb3a6b377e6e] [role=proxy] [MsgID=444525310215192584] [BeginTS=444525310215192584] [EndTS=444525310215192584] [db=default] [collection=test1]

[2023/09/26 11:58:05.436 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=5e1591877826364] [role=proxy] [db=default] [collection=test1]

[2023/09/26 11:58:05.436 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=5e1591877826364] [role=proxy] [msgID=444525310228561921] [BeginTS=444525310228561921] [EndTS=444525310228561921] [db=default] [collection=test1]

[2023/09/26 11:58:05.436 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=5e1591877826364] [role=proxy] [msgID=444525310228561921] [BeginTS=444525310228561921] [EndTS=444525310228561921] [db=default] [collection=test1]

[2023/09/26 11:58:05.449 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=429207befe4a61b0] [role=proxy] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.449 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=429207befe4a61b0] [role=proxy] [MsgID=444525310228561922] [BeginTS=444525310228561922] [EndTS=444525310228561922] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.450 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=429207befe4a61b0] [role=proxy] [MsgID=444525310228561922] [BeginTS=444525310228561922] [EndTS=444525310228561922] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.462 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=32a47dcf7d66eed6] [role=proxy] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.463 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=32a47dcf7d66eed6] [role=proxy] [MsgID=444525310228561924] [BeginTS=444525310228561924] [EndTS=444525310228561924] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.463 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=32a47dcf7d66eed6] [role=proxy] [MsgID=444525310228561924] [BeginTS=444525310228561924] [EndTS=444525310228561924] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.476 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=604a729f08ca41b0] [role=proxy] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.476 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=604a729f08ca41b0] [role=proxy] [msgID=444525310228561926] [BeginTS=444525310228561926] [EndTS=444525310228561926] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.477 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=604a729f08ca41b0] [role=proxy] [msgID=444525310228561926] [BeginTS=444525310228561926] [EndTS=444525310228561926] [db=default] [collection=hello_milvus3]

[2023/09/26 11:58:05.489 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=20492de1a2ad08fe] [role=proxy] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.490 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=20492de1a2ad08fe] [role=proxy] [MsgID=444525310241669121] [BeginTS=444525310241669121] [EndTS=444525310241669121] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.490 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=20492de1a2ad08fe] [role=proxy] [MsgID=444525310241669121] [BeginTS=444525310241669121] [EndTS=444525310241669121] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.510 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=d26c2bf5641aba6] [role=proxy] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.510 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=d26c2bf5641aba6] [role=proxy] [MsgID=444525310241669124] [BeginTS=444525310241669124] [EndTS=444525310241669124] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.511 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=d26c2bf5641aba6] [role=proxy] [MsgID=444525310241669124] [BeginTS=444525310241669124] [EndTS=444525310241669124] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.523 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=1a0a2b5a54205292] [role=proxy] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.524 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=1a0a2b5a54205292] [role=proxy] [msgID=444525310241669126] [BeginTS=444525310241669126] [EndTS=444525310241669126] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.524 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=1a0a2b5a54205292] [role=proxy] [msgID=444525310241669126] [BeginTS=444525310241669126] [EndTS=444525310241669126] [db=default] [collection=hello_milvus2]

[2023/09/26 11:58:05.536 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=7a850a6daa76c1d6] [role=proxy] [db=default] [collection=test2]

[2023/09/26 11:58:05.537 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=7a850a6daa76c1d6] [role=proxy] [MsgID=444525310254776321] [BeginTS=444525310254776321] [EndTS=444525310254776321] [db=default] [collection=test2]

[2023/09/26 11:58:05.537 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=7a850a6daa76c1d6] [role=proxy] [MsgID=444525310254776321] [BeginTS=444525310254776321] [EndTS=444525310254776321] [db=default] [collection=test2]

[2023/09/26 11:58:05.550 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=6ccb6c9d908fb69f] [role=proxy] [db=default] [collection=test2]

[2023/09/26 11:58:05.550 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=6ccb6c9d908fb69f] [role=proxy] [MsgID=444525310254776323] [BeginTS=444525310254776323] [EndTS=444525310254776323] [db=default] [collection=test2]

[2023/09/26 11:58:05.551 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=6ccb6c9d908fb69f] [role=proxy] [MsgID=444525310254776323] [BeginTS=444525310254776323] [EndTS=444525310254776323] [db=default] [collection=test2]

[2023/09/26 11:58:05.563 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=2b1b2726210125f] [role=proxy] [db=default] [collection=test2]

[2023/09/26 11:58:05.564 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=2b1b2726210125f] [role=proxy] [msgID=444525310254776325] [BeginTS=444525310254776325] [EndTS=444525310254776325] [db=default] [collection=test2]

[2023/09/26 11:58:05.564 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=2b1b2726210125f] [role=proxy] [msgID=444525310254776325] [BeginTS=444525310254776325] [EndTS=444525310254776325] [db=default] [collection=test2]

[2023/09/26 11:58:05.577 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=6aee85787c18486f] [role=proxy] [db=default] [collection=test3]

[2023/09/26 11:58:05.577 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=6aee85787c18486f] [role=proxy] [MsgID=444525310254776327] [BeginTS=444525310254776327] [EndTS=444525310254776327] [db=default] [collection=test3]

[2023/09/26 11:58:05.578 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=6aee85787c18486f] [role=proxy] [MsgID=444525310254776327] [BeginTS=444525310254776327] [EndTS=444525310254776327] [db=default] [collection=test3]

[2023/09/26 11:58:05.590 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=68df4c967fddab92] [role=proxy] [db=default] [collection=test3]

[2023/09/26 11:58:05.590 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=68df4c967fddab92] [role=proxy] [MsgID=444525310267883523] [BeginTS=444525310267883523] [EndTS=444525310267883523] [db=default] [collection=test3]

[2023/09/26 11:58:05.591 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=68df4c967fddab92] [role=proxy] [MsgID=444525310267883523] [BeginTS=444525310267883523] [EndTS=444525310267883523] [db=default] [collection=test3]

[2023/09/26 11:58:05.604 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=6a84d5971d208553] [role=proxy] [db=default] [collection=test3]

[2023/09/26 11:58:05.604 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=6a84d5971d208553] [role=proxy] [msgID=444525310267883526] [BeginTS=444525310267883526] [EndTS=444525310267883526] [db=default] [collection=test3]

[2023/09/26 11:58:05.605 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=6a84d5971d208553] [role=proxy] [msgID=444525310267883526] [BeginTS=444525310267883526] [EndTS=444525310267883526] [db=default] [collection=test3]

[2023/09/26 11:58:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[test3,hello_milvus2,hello_milvus3,test1,test2]"]

[2023/09/26 11:58:22.801 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default2] [collections="[]"]

[2023/09/26 11:58:28.082 +00:00] [INFO] [proxy/impl.go:5576] ["connect received"] [traceID=58e1315cffdfe6f4] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:58:28.113887"] [user=] [host=test.com] [db=default2]

[2023/09/26 11:58:28.083 +00:00] [INFO] [proxy/client_info.go:45] ["client register"] [traceID=58e1315cffdfe6f4] [sdk_type=Python] [sdk_version=2.3.0] [local_time="2023-09-26 19:58:28.113887"] [user=] [host=test.com] [identifier=444525316166123522] [last_active_time=2023/09/26 11:58:28.083 +00:00] [db=default2]

[2023/09/26 11:58:28.105 +00:00] [INFO] [proxy/impl.go:278] ["ListDatabases received"] [traceID=3c9f988eeb198a68] [role=proxy]

[2023/09/26 11:58:28.106 +00:00] [INFO] [proxy/impl.go:290] ["ListDatabases enqueued"] [traceID=3c9f988eeb198a68] [role=proxy]

[2023/09/26 11:58:28.106 +00:00] [INFO] [proxy/impl.go:301] ["ListDatabases done"] [traceID=3c9f988eeb198a68] [role=proxy] ["num of db"=2]

[2023/09/26 11:58:28.128 +00:00] [INFO] [proxy/impl.go:1084] ["ShowCollections received"] [role=proxy] [DbName=default2] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:58:28.128 +00:00] [INFO] [proxy/impl.go:1112] ["ShowCollections enqueued"] [role=proxy] [MsgID=444525316178968577] [DbName=default2] [TimeStamp=0] [ShowType=All] [CollectionNames="[]"]

[2023/09/26 11:58:28.129 +00:00] [INFO] [proxy/impl.go:1143] ["ShowCollections Done"] [role=proxy] [MsgID=444525316178968577] [DbName=default2] [TimeStamp=0] [ShowType=All] [len(CollectionNames)=0] [num_collections=1]

[2023/09/26 11:58:28.141 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=14f9d4a0f7b2250e] [role=proxy] [db=default2] [collection=test1]

[2023/09/26 11:58:28.142 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=14f9d4a0f7b2250e] [role=proxy] [MsgID=444525316178968579] [BeginTS=444525316178968579] [EndTS=444525316178968579] [db=default2] [collection=test1]

[2023/09/26 11:58:28.142 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=14f9d4a0f7b2250e] [role=proxy] [MsgID=444525316178968579] [BeginTS=444525316178968579] [EndTS=444525316178968579] [db=default2] [collection=test1]

[2023/09/26 11:58:28.155 +00:00] [INFO] [proxy/impl.go:791] ["DescribeCollection received"] [traceID=5f50c8aa41a5b73a] [role=proxy] [db=default2] [collection=test1]

[2023/09/26 11:58:28.155 +00:00] [INFO] [proxy/impl.go:815] ["DescribeCollection enqueued"] [traceID=5f50c8aa41a5b73a] [role=proxy] [MsgID=444525316178968581] [BeginTS=444525316178968581] [EndTS=444525316178968581] [db=default2] [collection=test1]

[2023/09/26 11:58:28.156 +00:00] [INFO] [proxy/impl.go:846] ["DescribeCollection done"] [traceID=5f50c8aa41a5b73a] [role=proxy] [MsgID=444525316178968581] [BeginTS=444525316178968581] [EndTS=444525316178968581] [db=default2] [collection=test1]

[2023/09/26 11:58:28.169 +00:00] [INFO] [proxy/impl.go:989] ["GetCollectionStatistics received"] [traceID=47b51af4ab1edf8] [role=proxy] [db=default2] [collection=test1]

[2023/09/26 11:58:28.169 +00:00] [INFO] [proxy/impl.go:1016] ["GetCollectionStatistics enqueued"] [traceID=47b51af4ab1edf8] [role=proxy] [msgID=444525316178968583] [BeginTS=444525316178968583] [EndTS=444525316178968583] [db=default2] [collection=test1]

[2023/09/26 11:58:28.170 +00:00] [INFO] [proxy/impl.go:1049] ["GetCollectionStatistics done"] [traceID=47b51af4ab1edf8] [role=proxy] [msgID=444525316178968583] [BeginTS=444525316178968583] [EndTS=444525316178968583] [db=default2] [collection=test1]

[2023/09/26 11:58:52.800 +00:00] [INFO] [proxy/meta_cache.go:869] ["expire all shard leader cache"] [database=default] [collections="[hello_milvus2,hello_milvus3,test1,test2,test3]"]

Anything else?

No response

StormstoutY commented 1 year ago

I try several times, everytime I rename a collection(no matter the num of entities) in the database other than "default", the renamed collection will be moved to the default database

xiaofan-luan commented 1 year ago

I think this is bug because rename didn't support database.

xiaofan-luan commented 1 year ago

/assign @smellthemoon

yanliang567 commented 1 year ago

reproduce on latest master. @NicoYuan1986 please help to add a test for this scenario.

yanliang567 commented 1 year ago

seems to be a pymilvus issue, there is a new param 'new_db_name' and the default value is 'default', which causes this issue.

yanliang567 commented 1 year ago

/assign @jaime0815 I think the default value for 'new_db_name' shall be the db_name that is currently using. /unassign @XuanYang-cn @smellthemoon

xiaofan-luan commented 1 year ago

/assign @smellthemoon

could you help on it?

smellthemoon commented 1 year ago

db_name will be fill with cur dbName or default dbName(DatabaseInterceptor), new_db_name will be set as db_name.

1

So no need to set new_db_name "default" in sdk. 2

smellthemoon commented 1 year ago

behavior change: not pass new_db_name, will consider rename it in the original db; pass the new_db_name, will rename the collection in the new_db_name. @NicoYuan1986 can you help with it? @jaime0815 I have checked the go-sdk, seems that support rename db_name has only realized in PyMilvus?

NicoYuan1986 commented 1 year ago

verify fixed. pr: #27400 pymilvus version: 2.3.1.post1.dev11

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Rotten issues close after 30d of inactivity. Reopen the issue with /reopen.