Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
8ec040a3
M
milvus
项目概览
milvus
/
milvus
12 个月 前同步成功
通知
261
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,发现更多精彩内容 >>
未验证
提交
8ec040a3
编写于
11月 08, 2021
作者:
Y
yukun
提交者:
GitHub
11月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add rocksmqPageSize to config (#11113)
Signed-off-by:
N
fishpenguin
<
kun.yu@zilliz.com
>
上级
dc9e8566
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
36 addition
and
8 deletion
+36
-8
configs/milvus.yaml
configs/milvus.yaml
+4
-3
internal/util/rocksmq/server/rocksmq/global_rmq.go
internal/util/rocksmq/server/rocksmq/global_rmq.go
+30
-3
internal/util/rocksmq/server/rocksmq/rocksmq_retention.go
internal/util/rocksmq/server/rocksmq/rocksmq_retention.go
+2
-2
未找到文件。
configs/milvus.yaml
浏览文件 @
8ec040a3
...
...
@@ -43,9 +43,10 @@ pulsar:
maxMessageSize
:
5242880
# 5 * 1024 * 1024 Bytes, Maximum size of each message in pulsar.
rocksmq
:
path
:
/var/lib/milvus/rdb_data
# The path where the message is stored in rocksmq
retentionTimeInMinutes
:
4320
# The time the messages are saved in rocksmq
retentionSizeInMB
:
0
# The size of the message saved in rocksmq
path
:
/var/lib/milvus/rdb_data
rocksmqPageSize
:
2147483648
# 2 GB, 2 * 1024 * 1024 * 1024
retentionTimeInMinutes
:
4320
# 3 days, 3 * 24 * 60
retentionSizeInMB
:
0
# Related configuration of rootCoord, used to handle data definition language (DDL) and data control language (DCL) requests
rootCoord
:
...
...
internal/util/rocksmq/server/rocksmq/global_rmq.go
浏览文件 @
8ec040a3
...
...
@@ -13,6 +13,7 @@ package rocksmq
import
(
"os"
"strconv"
"sync"
"sync/atomic"
...
...
@@ -64,9 +65,35 @@ func InitRocksMQ() error {
idAllocator
:=
allocator
.
NewGlobalIDAllocator
(
"rmq_id"
,
rocksdbKV
)
_
=
idAllocator
.
Initialize
()
atomic
.
StoreInt64
(
&
RocksmqRetentionTimeInMinutes
,
params
.
ParseInt64
(
"rocksmq.retentionTimeInMinutes"
))
atomic
.
StoreInt64
(
&
RocksmqRetentionSizeInMB
,
params
.
ParseInt64
(
"rocksmq.retentionSizeInMB"
))
log
.
Debug
(
"Rocksmq retention: "
,
zap
.
Any
(
"RocksmqRetentionTimeInMinutes"
,
RocksmqRetentionTimeInMinutes
),
zap
.
Any
(
"RocksmqRetentionSizeInMB"
,
RocksmqRetentionSizeInMB
))
rawRmqPageSize
,
err
:=
params
.
Load
(
"rocksmq.rocksmqPageSize"
)
if
err
==
nil
&&
rawRmqPageSize
!=
""
{
rmqPageSize
,
err
:=
strconv
.
ParseInt
(
rawRmqPageSize
,
10
,
64
)
if
err
==
nil
{
atomic
.
StoreInt64
(
&
RocksmqPageSize
,
rmqPageSize
)
}
else
{
log
.
Warn
(
"rocksmq.rocksmqPageSize is invalid, using default value 2G"
)
}
}
rawRmqRetentionTimeInMinutes
,
err
:=
params
.
Load
(
"rocksmq.retentionTimeInMinutes"
)
if
err
==
nil
&&
rawRmqRetentionTimeInMinutes
!=
""
{
rawRmqRetentionTimeInMinutes
,
err
:=
strconv
.
ParseInt
(
rawRmqRetentionTimeInMinutes
,
10
,
64
)
if
err
==
nil
{
atomic
.
StoreInt64
(
&
RocksmqRetentionTimeInMinutes
,
rawRmqRetentionTimeInMinutes
)
}
else
{
log
.
Warn
(
"rocksmq.retentionTimeInMinutes is invalid, using default value 3 days"
)
}
}
rawRmqRetentionSizeInMB
,
err
:=
params
.
Load
(
"rocksmq.retentionSizeInMB"
)
if
err
==
nil
&&
rawRmqRetentionSizeInMB
!=
""
{
rawRmqRetentionSizeInMB
,
err
:=
strconv
.
ParseInt
(
rawRmqRetentionSizeInMB
,
10
,
64
)
if
err
==
nil
{
atomic
.
StoreInt64
(
&
RocksmqRetentionSizeInMB
,
rawRmqRetentionSizeInMB
)
}
else
{
log
.
Warn
(
"rocksmq.retentionSizeInMB is invalid, using default value 0"
)
}
}
log
.
Debug
(
""
,
zap
.
Any
(
"RocksmqRetentionTimeInMinutes"
,
RocksmqRetentionTimeInMinutes
),
zap
.
Any
(
"RocksmqRetentionSizeInMB"
,
RocksmqRetentionSizeInMB
),
zap
.
Any
(
"RocksmqPageSize"
,
RocksmqPageSize
))
Rmq
,
err
=
NewRocksMQ
(
rocksdbName
,
idAllocator
)
if
err
!=
nil
{
panic
(
err
)
...
...
internal/util/rocksmq/server/rocksmq/rocksmq_retention.go
浏览文件 @
8ec040a3
...
...
@@ -26,10 +26,10 @@ import (
)
// RocksmqRetentionTimeInMinutes is the time of retention
var
RocksmqRetentionTimeInMinutes
int64
var
RocksmqRetentionTimeInMinutes
int64
=
4320
// RocksmqRetentionSizeInMB is the size of retention
var
RocksmqRetentionSizeInMB
int64
var
RocksmqRetentionSizeInMB
int64
=
0
// Const value that used to convert unit
const
(
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录