diff --git a/shards/README.md b/shards/README.md index 41eb97b9c63b043bfdac575cc2f014d206a0eef5..1ad7c54a82607a4bb900d325c8918343ff447605 100644 --- a/shards/README.md +++ b/shards/README.md @@ -54,7 +54,7 @@ Follow below steps to start a standalone Milvus instance with Mishards from sour 3. Start Milvus server. ```shell - $ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.10.4-gpu-d120220-e72454 + $ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.10.5-gpu-d010621-4eda95 ``` 4. Update path permissions. diff --git a/shards/README_CN.md b/shards/README_CN.md index 9692091e4bb57c06e0ca0bdd8e60a87cbfd86f77..7ab4862738cd5f1d2c046fb71812fda58d611711 100644 --- a/shards/README_CN.md +++ b/shards/README_CN.md @@ -48,7 +48,7 @@ Python 版本为3.6及以上。 3. 启动 Milvus 服务。 ```shell - $ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.10.4-gpu-d120220-e72454 + $ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.10.5-gpu-d010621-4eda95 ``` 4. 更改目录权限。 diff --git a/shards/all_in_one/all_in_one.yml b/shards/all_in_one/all_in_one.yml index 73e3d42a494fe2316b5ed5ee230743fac36b87dd..bb5bd2cea949edbc3dc9ae28a8e73b853d35f90f 100644 --- a/shards/all_in_one/all_in_one.yml +++ b/shards/all_in_one/all_in_one.yml @@ -3,7 +3,7 @@ services: milvus_wr: runtime: nvidia restart: always - image: milvusdb/milvus:0.10.4-gpu-d120220-e72454 + image: milvusdb/milvus:0.10.5-gpu-d010621-4eda95 ports: - "0.0.0.0:19540:19530" volumes: @@ -13,7 +13,7 @@ services: milvus_ro: runtime: nvidia restart: always - image: milvusdb/milvus:0.10.4-gpu-d120220-e72454 + image: milvusdb/milvus:0.10.5-gpu-d010621-4eda95 ports: - "0.0.0.0:19541:19530" volumes: diff --git a/shards/all_in_one_with_mysql/all_in_one.yml b/shards/all_in_one_with_mysql/all_in_one.yml index 9dd6756bb7b70dd288af8382f479c3794a836883..297a57c3105ae0c8c82b99e9830bcbc4bf17b1bb 100644 --- a/shards/all_in_one_with_mysql/all_in_one.yml +++ b/shards/all_in_one_with_mysql/all_in_one.yml @@ -18,7 +18,7 @@ services: milvus_wr: runtime: nvidia restart: always - image: milvusdb/milvus:0.10.4-gpu-d120220-e72454 + image: milvusdb/milvus:0.10.5-gpu-d010621-4eda95 volumes: - /tmp/milvus/db:/var/lib/milvus/db - ./wr_server.yml:/var/lib/milvus/conf/server_config.yaml @@ -29,7 +29,7 @@ services: milvus_ro: runtime: nvidia restart: always - image: milvusdb/milvus:0.10.4-gpu-d120220-e72454 + image: milvusdb/milvus:0.10.5-gpu-d010621-4eda95 volumes: - /tmp/milvus/db:/var/lib/milvus/db - ./ro_server.yml:/var/lib/milvus/conf/server_config.yaml diff --git a/shards/mishards/router/plugins/file_based_hash_ring_router.py b/shards/mishards/router/plugins/file_based_hash_ring_router.py index 93d14022a0b1d75282a06f5524a73e48a1bc98b9..0be37fc7a31d8e0b2e9f565d75c75c79b8aec55c 100644 --- a/shards/mishards/router/plugins/file_based_hash_ring_router.py +++ b/shards/mishards/router/plugins/file_based_hash_ring_router.py @@ -66,8 +66,10 @@ class Factory(RouterMixin): raise exceptions.DBError(message=str(e), metadata=metadata) if not collections: - logger.error("Cannot find collection {} / {} in metadata".format(collection_name, partition_tags)) - raise exceptions.CollectionNotFoundError('{}:{}'.format(collection_name, partition_tags), metadata=metadata) + logger.error("Cannot find collection {} / {} in metadata during routing. Meta url: {}" + .format(collection_name, partition_tags, db.url)) + raise exceptions.CollectionNotFoundError("{}:{} not found in metadata".format(collection_name, partition_tags), + metadata=metadata) collection_list = [] if not partition_tags: diff --git a/shards/mishards/service_handler.py b/shards/mishards/service_handler.py index b2e7b99e56348c11c524d2d6f739508bd91ba2e5..c976f38840df15d975395fc8bb9eaffe5835c43f 100644 --- a/shards/mishards/service_handler.py +++ b/shards/mishards/service_handler.py @@ -132,12 +132,12 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer): all_topk_results.append(ret) else: futures = [] + start = time.time() for addr, files_tuple in routing.items(): search_file_ids, ud_file_ids = files_tuple if ud_file_ids: logger.debug(f"<{addr}> needed update segment ids {ud_file_ids}") conn = self.router.query_conn(addr, metadata=metadata) - start = time.time() ud_file_ids and conn.reload_segments(collection_id, ud_file_ids) span = kwargs.get('span', None) span = span if span else (None if self.tracer.empty else @@ -155,6 +155,7 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer): for f in futures: ret = f.result(raw=True) all_topk_results.append(ret) + logger.debug("Search in routing {} cost {} s".format(routing, time.time() - start)) reverse = collection_meta.metric_type == Types.MetricType.IP with self.tracer.start_span('do_merge', child_of=p_span): @@ -308,7 +309,7 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer): topk = request.topk if len(request.extra_params) == 0: - raise exceptions.SearchParamError(message="Search parma loss", metadata=metadata) + raise exceptions.SearchParamError(message="Search param loss", metadata=metadata) params = ujson.loads(str(request.extra_params[0].value)) logger.info('Search {}: topk={} params={}'.format( @@ -329,7 +330,7 @@ class ServiceHandler(milvus_pb2_grpc.MilvusServiceServicer): metadata=metadata).get_collection_info(collection_name) if not status.OK(): raise exceptions.CollectionNotFoundError(collection_name, - metadata=metadata) + metadata=metadata) self.collection_meta[collection_name] = info collection_meta = info diff --git a/shards/requirements.txt b/shards/requirements.txt index e0e4a1cf9a35694f7a6ec1afee120fa3f02fb1d9..b2e0f7dcb327a6a85a4a4e8a0bc4355cccae3540 100644 --- a/shards/requirements.txt +++ b/shards/requirements.txt @@ -14,8 +14,8 @@ py==1.8.0 pyasn1==0.4.7 pyasn1-modules==0.2.6 pylint==2.5.0 -#pymilvus==0.2.14 -pymilvus-test==0.3.37 +pymilvus==0.2.15 +#pymilvus-test==0.3.37 pyparsing==2.4.0 pytest==4.6.3 pytest-level==0.1.1