Skip to content

Commit

Permalink
[skip ci] mishards upgrade for milvus 0.10.5 (#4581)
Browse files Browse the repository at this point in the history
Signed-off-by: yinghao.zou <[email protected]>
  • Loading branch information
BossZou committed Jan 6, 2021
1 parent 4eda95e commit 4175ac1
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion shards/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion shards/README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. 更改目录权限。
Expand Down
4 changes: 2 additions & 2 deletions shards/all_in_one/all_in_one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions shards/all_in_one_with_mysql/all_in_one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 4 additions & 2 deletions shards/mishards/router/plugins/file_based_hash_ring_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ def _route(self, collection_name, range_array, partition_tags=None, metadata=Non
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:
Expand Down
7 changes: 4 additions & 3 deletions shards/mishards/service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ def _do_query(self,
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
Expand All @@ -155,6 +155,7 @@ def _do_query(self,
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):
Expand Down Expand Up @@ -308,7 +309,7 @@ def Search(self, request, context):
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(
Expand All @@ -329,7 +330,7 @@ def Search(self, request, context):
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
Expand Down
4 changes: 2 additions & 2 deletions shards/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4175ac1

Please sign in to comment.