Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
d2c8462d
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
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,发现更多精彩内容 >>
未验证
提交
d2c8462d
编写于
6月 22, 2021
作者:
S
sunby
提交者:
GitHub
6月 22, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename params in data_coord.yaml (#5968)
Signed-off-by:
N
sunby
<
bingyi.sun@zilliz.com
>
上级
d5f4ee6f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
23 addition
and
21 deletion
+23
-21
cmd/binlog/main.go
cmd/binlog/main.go
+2
-0
configs/advanced/data_coord.yaml
configs/advanced/data_coord.yaml
+3
-3
internal/datacoord/param.go
internal/datacoord/param.go
+13
-13
internal/datacoord/segment_allocation_policy.go
internal/datacoord/segment_allocation_policy.go
+2
-2
internal/datacoord/segment_manager.go
internal/datacoord/segment_manager.go
+2
-2
internal/datacoord/server_test.go
internal/datacoord/server_test.go
+1
-1
未找到文件。
cmd/binlog/main.go
浏览文件 @
d2c8462d
...
...
@@ -24,5 +24,7 @@ func main() {
}
if
err
:=
storage
.
PrintBinlogFiles
(
os
.
Args
[
1
:
]);
err
!=
nil
{
fmt
.
Printf
(
"error: %s
\n
"
,
err
.
Error
())
}
else
{
fmt
.
Printf
(
"print binlog complete.
\n
"
)
}
}
configs/advanced/data_
service
.yaml
→
configs/advanced/data_
coord
.yaml
浏览文件 @
d2c8462d
...
...
@@ -11,6 +11,6 @@
datacoord
:
segment
:
s
ize
:
512
# MB
s
izeFactor
:
0.75
IDAssign
Expiration
:
2000
# ms
maxS
ize
:
512
# MB
s
ealProportion
:
0.75
assignment
Expiration
:
2000
# ms
internal/datacoord/param.go
浏览文件 @
d2c8462d
...
...
@@ -42,9 +42,9 @@ type ParamTable struct {
StatsStreamPosSubPath
string
// segment
Segment
Size
float64
SegmentS
izeFactor
float64
Seg
IDAssign
Expiration
int64
Segment
MaxSize
float64
SegmentS
ealProportion
float64
Seg
Assignment
Expiration
int64
InsertChannelPrefixName
string
StatisticsChannelName
string
...
...
@@ -63,7 +63,7 @@ func (p *ParamTable) Init() {
// load yaml
p
.
BaseTable
.
Init
()
if
err
:=
p
.
LoadYaml
(
"advanced/data_
service
.yaml"
);
err
!=
nil
{
if
err
:=
p
.
LoadYaml
(
"advanced/data_
coord
.yaml"
);
err
!=
nil
{
panic
(
err
)
}
...
...
@@ -76,9 +76,9 @@ func (p *ParamTable) Init() {
p
.
initPulsarAddress
()
p
.
initSegmentSize
()
p
.
initSegmentS
izeFactor
()
p
.
initSeg
IDAssign
Expiration
()
p
.
initSegment
Max
Size
()
p
.
initSegmentS
ealProportion
()
p
.
initSeg
Assignment
Expiration
()
p
.
initInsertChannelPrefixName
()
p
.
initStatisticsChannelName
()
p
.
initTimeTickChannelName
()
...
...
@@ -147,16 +147,16 @@ func (p *ParamTable) initCollectionBinlogSubPath() {
p
.
CollectionBinlogSubPath
=
subPath
}
func
(
p
*
ParamTable
)
initSegmentSize
()
{
p
.
Segment
Size
=
p
.
ParseFloat
(
"datacoord.segment.s
ize"
)
func
(
p
*
ParamTable
)
initSegment
Max
Size
()
{
p
.
Segment
MaxSize
=
p
.
ParseFloat
(
"datacoord.segment.maxS
ize"
)
}
func
(
p
*
ParamTable
)
initSegmentS
izeFactor
()
{
p
.
SegmentS
izeFactor
=
p
.
ParseFloat
(
"datacoord.segment.sizeFactor
"
)
func
(
p
*
ParamTable
)
initSegmentS
ealProportion
()
{
p
.
SegmentS
ealProportion
=
p
.
ParseFloat
(
"datacoord.segment.sealProportion
"
)
}
func
(
p
*
ParamTable
)
initSeg
IDAssign
Expiration
()
{
p
.
Seg
IDAssignExpiration
=
p
.
ParseInt64
(
"datacoord.segment.IDAssignExpiration"
)
//ms
func
(
p
*
ParamTable
)
initSeg
Assignment
Expiration
()
{
p
.
Seg
AssignmentExpiration
=
p
.
ParseInt64
(
"datacoord.segment.assignmentExpiration"
)
}
func
(
p
*
ParamTable
)
initInsertChannelPrefixName
()
{
...
...
internal/datacoord/segment_allocation_policy.go
浏览文件 @
d2c8462d
...
...
@@ -31,7 +31,7 @@ func (p *calBySchemaPolicy) apply(schema *schemapb.CollectionSchema) (int, error
if
err
!=
nil
{
return
-
1
,
err
}
threshold
:=
Params
.
SegmentSize
*
1024
*
1024
threshold
:=
Params
.
Segment
Max
Size
*
1024
*
1024
return
int
(
threshold
/
float64
(
sizePerRecord
)),
nil
}
...
...
@@ -108,7 +108,7 @@ type sealPolicyV1 struct {
}
func
(
p
*
sealPolicyV1
)
apply
(
maxCount
,
writtenCount
,
allocatedCount
int64
)
bool
{
return
float64
(
writtenCount
)
>=
Params
.
SegmentS
izeFactor
*
float64
(
maxCount
)
return
float64
(
writtenCount
)
>=
Params
.
SegmentS
ealProportion
*
float64
(
maxCount
)
}
func
newSealPolicyV1
()
sealPolicy
{
...
...
internal/datacoord/segment_manager.go
浏览文件 @
d2c8462d
...
...
@@ -162,7 +162,7 @@ func defaultSealPolicy() sealPolicy {
}
func
defaultSegmentSealPolicy
()
segmentSealPolicy
{
return
getSegmentCapacityPolicy
(
Params
.
SegmentS
izeFactor
)
return
getSegmentCapacityPolicy
(
Params
.
SegmentS
ealProportion
)
}
func
defaultFlushPolicy
()
flushPolicy
{
...
...
@@ -287,7 +287,7 @@ func (s *SegmentManager) genExpireTs() (Timestamp, error) {
return
0
,
err
}
physicalTs
,
logicalTs
:=
tsoutil
.
ParseTS
(
ts
)
expirePhysicalTs
:=
physicalTs
.
Add
(
time
.
Duration
(
Params
.
Seg
IDAssign
Expiration
)
*
time
.
Millisecond
)
expirePhysicalTs
:=
physicalTs
.
Add
(
time
.
Duration
(
Params
.
Seg
Assignment
Expiration
)
*
time
.
Millisecond
)
expireTs
:=
tsoutil
.
ComposeTS
(
expirePhysicalTs
.
UnixNano
()
/
int64
(
time
.
Millisecond
),
int64
(
logicalTs
))
return
expireTs
,
nil
}
...
...
internal/datacoord/server_test.go
浏览文件 @
d2c8462d
...
...
@@ -59,7 +59,7 @@ func TestAssignSegmentID(t *testing.T) {
})
recordSize
,
err
:=
typeutil
.
EstimateSizePerRecord
(
schema
)
assert
.
Nil
(
t
,
err
)
maxCount
:=
int
(
Params
.
SegmentSize
*
1024
*
1024
/
float64
(
recordSize
))
maxCount
:=
int
(
Params
.
Segment
Max
Size
*
1024
*
1024
/
float64
(
recordSize
))
cases
:=
[]
struct
{
Description
string
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录