Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
4175ac1f
M
milvus
项目概览
milvus
/
milvus
8 个月 前同步成功
通知
260
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
4175ac1f
编写于
1月 06, 2021
作者:
B
BossZou
提交者:
GitHub
1月 06, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[skip ci] mishards upgrade for milvus 0.10.5 (#4581)
Signed-off-by:
N
yinghao.zou
<
yinghao.zou@zilliz.com
>
上级
4eda95e6
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
16 addition
and
13 deletion
+16
-13
shards/README.md
shards/README.md
+1
-1
shards/README_CN.md
shards/README_CN.md
+1
-1
shards/all_in_one/all_in_one.yml
shards/all_in_one/all_in_one.yml
+2
-2
shards/all_in_one_with_mysql/all_in_one.yml
shards/all_in_one_with_mysql/all_in_one.yml
+2
-2
shards/mishards/router/plugins/file_based_hash_ring_router.py
...ds/mishards/router/plugins/file_based_hash_ring_router.py
+4
-2
shards/mishards/service_handler.py
shards/mishards/service_handler.py
+4
-3
shards/requirements.txt
shards/requirements.txt
+2
-2
未找到文件。
shards/README.md
浏览文件 @
4175ac1f
...
...
@@ -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.
...
...
shards/README_CN.md
浏览文件 @
4175ac1f
...
...
@@ -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.
更改目录权限。
...
...
shards/all_in_one/all_in_one.yml
浏览文件 @
4175ac1f
...
...
@@ -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
:
...
...
shards/all_in_one_with_mysql/all_in_one.yml
浏览文件 @
4175ac1f
...
...
@@ -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
...
...
shards/mishards/router/plugins/file_based_hash_ring_router.py
浏览文件 @
4175ac1f
...
...
@@ -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
:
...
...
shards/mishards/service_handler.py
浏览文件 @
4175ac1f
...
...
@@ -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 par
ma
loss"
,
metadata
=
metadata
)
raise
exceptions
.
SearchParamError
(
message
=
"Search par
am
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
...
...
shards/requirements.txt
浏览文件 @
4175ac1f
...
...
@@ -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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录