Skip to content

Commit

Permalink
[skip ci] Upgrade mishards for v0.9.0 (#2358) (#2359)
Browse files Browse the repository at this point in the history
Signed-off-by: yhz <[email protected]>
  • Loading branch information
BossZou authored May 15, 2020
1 parent 2056ffe commit ab4bc07
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 42 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Please mark all change in change log and use the issue from GitHub
- \#2311 Update mishards methods
- \#2330 Change url for behavior 'get_entities_by_id'
- \#2347 Update http document for v0.9.0
- \#2358 Upgrade mishards for v0.9.0

## Task

Expand Down
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:/opt/milvus/db milvusdb/milvus:0.8.0-gpu-d041520-464400
$ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
```

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:/opt/milvus/db milvusdb/milvus:0.8.0-gpu-d041520-464400
$ sudo nvidia-docker run --rm -d -p 19530:19530 -v /tmp/milvus/db:/var/lib/milvus/db milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
```

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.8.0-gpu-d041520-464400
image: milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
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.8.0-gpu-d041520-464400
image: milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
ports:
- "0.0.0.0:19541:19530"
volumes:
Expand Down
14 changes: 6 additions & 8 deletions shards/all_in_one/ro_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@ wal_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# fatal.enable | Whether to enable fatal level logging in Milvus. | Boolean | true |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path | Location of logs files. | String | |
# path | Absolute path to the folder holding the log files. | String | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# max_log_file_size | Max size of a single log file. After exceeding this value, | Integer | 256 (MB) |
# | rename this file to xxx.log.n, means the nth file. | | |
# max_log_file_size | The maximum size of each log file, size range [512, 4096] | Integer | 1024 (MB) |
#----------------------+------------------------------------------------------------+------------+-----------------+
# delete_exceeds | Milvus will keep up to ${delete_exceeds} log files per | Integer | 10 |
# | level. For example, after xxx.log.11 file is generated, | | |
# | the xxx.log.1 file will be deleted. | | |
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
# | logging level, num range [0, 1024], 0 means unlimited. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
logs:
trace.enable: true
Expand All @@ -223,6 +221,6 @@ logs:
error.enable: true
fatal.enable: true
path: /var/lib/milvus/logs
max_log_file_size: 256
delete_exceeds: 10
max_log_file_size: 1024
log_rotate_num: 0

15 changes: 7 additions & 8 deletions shards/all_in_one/wr_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@ wal_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# fatal.enable | Whether to enable fatal level logging in Milvus. | Boolean | true |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path | Location of logs files. | String | |
# path | Absolute path to the folder holding the log files. | String | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# max_log_file_size | Max size of a single log file. After exceeding this value, | Integer | 256 (MB) |
# | rename this file to xxx.log.n, means the nth file. | | |
# max_log_file_size | The maximum size of each log file, size range [512, 4096] | Integer | 1024 (MB) |
#----------------------+------------------------------------------------------------+------------+-----------------+
# delete_exceeds | Milvus will keep up to ${delete_exceeds} log files per | Integer | 10 |
# | level. For example, after xxx.log.11 file is generated, | | |
# | the xxx.log.1 file will be deleted. | | |
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
# | logging level, num range [0, 1024], 0 means unlimited. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
logs:
trace.enable: true
Expand All @@ -223,6 +221,7 @@ logs:
error.enable: true
fatal.enable: true
path: /var/lib/milvus/logs
max_log_file_size: 256
delete_exceeds: 10
max_log_file_size: 1024
log_rotate_num: 0


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.8.0-gpu-d041520-464400
image: milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
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.8.0-gpu-d041520-464400
image: milvusdb/milvus:0.9.0-gpu-d051520-cb92b1
volumes:
- /tmp/milvus/db:/var/lib/milvus/db
- ./ro_server.yml:/var/lib/milvus/conf/server_config.yaml
Expand Down
15 changes: 7 additions & 8 deletions shards/all_in_one_with_mysql/ro_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@ wal_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# fatal.enable | Whether to enable fatal level logging in Milvus. | Boolean | true |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path | Location of logs files. | String | |
# path | Absolute path to the folder holding the log files. | String | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# max_log_file_size | Max size of a single log file. After exceeding this value, | Integer | 256 (MB) |
# | rename this file to xxx.log.n, means the nth file. | | |
# max_log_file_size | The maximum size of each log file, size range [512, 4096] | Integer | 1024 (MB) |
#----------------------+------------------------------------------------------------+------------+-----------------+
# delete_exceeds | Milvus will keep up to ${delete_exceeds} log files per | Integer | 10 |
# | level. For example, after xxx.log.11 file is generated, | | |
# | the xxx.log.1 file will be deleted. | | |
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
# | logging level, num range [0, 1024], 0 means unlimited. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
logs:
trace.enable: true
Expand All @@ -223,6 +221,7 @@ logs:
error.enable: true
fatal.enable: true
path: /var/lib/milvus/logs
max_log_file_size: 256
delete_exceeds: 10
max_log_file_size: 1024
log_rotate_num: 0


15 changes: 6 additions & 9 deletions shards/all_in_one_with_mysql/wr_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,12 @@ wal_config:
#----------------------+------------------------------------------------------------+------------+-----------------+
# fatal.enable | Whether to enable fatal level logging in Milvus. | Boolean | true |
#----------------------+------------------------------------------------------------+------------+-----------------+
# path | Location of logs files. | String | |
# path | Absolute path to the folder holding the log files. | String | |
#----------------------+------------------------------------------------------------+------------+-----------------+
# max_log_file_size | Max size of a single log file. After exceeding this value, | Integer | 256 (MB) |
# | rename this file to xxx.log.n, means the nth file. | | |
# max_log_file_size | The maximum size of each log file, size range [512, 4096] | Integer | 1024 (MB) |
#----------------------+------------------------------------------------------------+------------+-----------------+
# delete_exceeds | Milvus will keep up to ${delete_exceeds} log files per | Integer | 10 |
# | level. For example, after xxx.log.11 file is generated, | | |
# | the xxx.log.1 file will be deleted. | | |
# log_rotate_num | The maximum number of log files that Milvus keeps for each | Integer | 0 |
# | logging level, num range [0, 1024], 0 means unlimited. | | |
#----------------------+------------------------------------------------------------+------------+-----------------+
logs:
trace.enable: true
Expand All @@ -223,6 +221,5 @@ logs:
error.enable: true
fatal.enable: true
path: /var/lib/milvus/logs
max_log_file_size: 256
delete_exceeds: 10

max_log_file_size: 1024
log_rotate_num: 0
2 changes: 1 addition & 1 deletion shards/mishards/service_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def CreateIndex(self, request, context):
reason=_status.message)

def _add_vectors(self, param, metadata=None):
return self.router.connection(metadata=metadata).add_vectors(
return self.router.connection(metadata=metadata).insert(
None, None, insert_param=param)

@mark_grpc_method
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.10
pymilvus-test==0.3.15
#pymilvus==0.2.11
pymilvus-test==0.3.17
pyparsing==2.4.0
pytest==4.6.3
pytest-level==0.1.1
Expand Down

0 comments on commit ab4bc07

Please sign in to comment.