Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
173e7b38
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,发现更多精彩内容 >>
未验证
提交
173e7b38
编写于
11月 16, 2021
作者:
C
Cai Yudong
提交者:
GitHub
11月 16, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix golint warnings for rootcoord/root_coord.go (#11871)
Signed-off-by:
N
yudong.cai
<
yudong.cai@zilliz.com
>
上级
7e43b568
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
24 addition
and
24 deletion
+24
-24
internal/rootcoord/root_coord.go
internal/rootcoord/root_coord.go
+23
-23
internal/rootcoord/root_coord_test.go
internal/rootcoord/root_coord_test.go
+1
-1
未找到文件。
internal/rootcoord/root_coord.go
浏览文件 @
173e7b38
...
...
@@ -188,7 +188,7 @@ func (c *Core) isHealthy() bool {
func
(
c
*
Core
)
checkInit
()
error
{
if
c
.
MetaTable
==
nil
{
return
fmt
.
Errorf
(
"
M
etaTable is nil"
)
return
fmt
.
Errorf
(
"
m
etaTable is nil"
)
}
if
c
.
IDAllocator
==
nil
{
return
fmt
.
Errorf
(
"idAllocator is nil"
)
...
...
@@ -209,43 +209,43 @@ func (c *Core) checkInit() error {
return
fmt
.
Errorf
(
"kvBase is nil"
)
}
if
c
.
SendDdCreateCollectionReq
==
nil
{
return
fmt
.
Errorf
(
"
S
endDdCreateCollectionReq is nil"
)
return
fmt
.
Errorf
(
"
s
endDdCreateCollectionReq is nil"
)
}
if
c
.
SendDdDropCollectionReq
==
nil
{
return
fmt
.
Errorf
(
"
S
endDdDropCollectionReq is nil"
)
return
fmt
.
Errorf
(
"
s
endDdDropCollectionReq is nil"
)
}
if
c
.
SendDdCreatePartitionReq
==
nil
{
return
fmt
.
Errorf
(
"
S
endDdCreatePartitionReq is nil"
)
return
fmt
.
Errorf
(
"
s
endDdCreatePartitionReq is nil"
)
}
if
c
.
SendDdDropPartitionReq
==
nil
{
return
fmt
.
Errorf
(
"
S
endDdDropPartitionReq is nil"
)
return
fmt
.
Errorf
(
"
s
endDdDropPartitionReq is nil"
)
}
if
c
.
CallGetBinlogFilePathsService
==
nil
{
return
fmt
.
Errorf
(
"
C
allGetBinlogFilePathsService is nil"
)
return
fmt
.
Errorf
(
"
c
allGetBinlogFilePathsService is nil"
)
}
if
c
.
CallGetNumRowsService
==
nil
{
return
fmt
.
Errorf
(
"
C
allGetNumRowsService is nil"
)
return
fmt
.
Errorf
(
"
c
allGetNumRowsService is nil"
)
}
if
c
.
CallBuildIndexService
==
nil
{
return
fmt
.
Errorf
(
"
C
allBuildIndexService is nil"
)
return
fmt
.
Errorf
(
"
c
allBuildIndexService is nil"
)
}
if
c
.
CallDropIndexService
==
nil
{
return
fmt
.
Errorf
(
"
C
allDropIndexService is nil"
)
return
fmt
.
Errorf
(
"
c
allDropIndexService is nil"
)
}
if
c
.
CallGetFlushedSegmentsService
==
nil
{
return
fmt
.
Errorf
(
"
CallGetFlushedSegments
is nil"
)
return
fmt
.
Errorf
(
"
callGetFlushedSegmentsService
is nil"
)
}
if
c
.
CallWatchChannels
==
nil
{
return
fmt
.
Errorf
(
"
WatchChannelReq
is nil"
)
return
fmt
.
Errorf
(
"
callWatchChannels
is nil"
)
}
if
c
.
NewProxyClient
==
nil
{
return
fmt
.
Errorf
(
"
N
ewProxyClient is nil"
)
return
fmt
.
Errorf
(
"
n
ewProxyClient is nil"
)
}
if
c
.
CallReleaseCollectionService
==
nil
{
return
fmt
.
Errorf
(
"
C
allReleaseCollectionService is nil"
)
return
fmt
.
Errorf
(
"
c
allReleaseCollectionService is nil"
)
}
if
c
.
CallReleasePartitionService
==
nil
{
return
fmt
.
Errorf
(
"
C
allReleasePartitionService is nil"
)
return
fmt
.
Errorf
(
"
c
allReleasePartitionService is nil"
)
}
return
nil
...
...
@@ -425,15 +425,15 @@ func (c *Core) setDdMsgSendFlag(b bool) error {
func
(
c
*
Core
)
setMsgStreams
()
error
{
if
Params
.
PulsarAddress
==
""
{
return
fmt
.
Errorf
(
"
P
ulsarAddress is empty"
)
return
fmt
.
Errorf
(
"
p
ulsarAddress is empty"
)
}
if
Params
.
MsgChannelSubName
==
""
{
return
fmt
.
Errorf
(
"
MsgChannelSubName is emptyr
"
)
return
fmt
.
Errorf
(
"
msgChannelSubName is empty
"
)
}
// rootcoord time tick channel
if
Params
.
TimeTickChannel
==
""
{
return
fmt
.
Errorf
(
"
T
imeTickChannel is empty"
)
return
fmt
.
Errorf
(
"
t
imeTickChannel is empty"
)
}
timeTickStream
,
_
:=
c
.
msFactory
.
NewMsgStream
(
c
.
ctx
)
timeTickStream
.
AsProducer
([]
string
{
Params
.
TimeTickChannel
})
...
...
@@ -603,7 +603,7 @@ func (c *Core) SetDataCoord(ctx context.Context, s types.DataCoord) error {
return
nil
,
err
}
if
binlog
.
Status
.
ErrorCode
!=
commonpb
.
ErrorCode_Success
{
return
nil
,
fmt
.
Errorf
(
"
G
etInsertBinlogPaths from data service failed, error = %s"
,
binlog
.
Status
.
Reason
)
return
nil
,
fmt
.
Errorf
(
"
g
etInsertBinlogPaths from data service failed, error = %s"
,
binlog
.
Status
.
Reason
)
}
for
i
:=
range
binlog
.
FieldIDs
{
if
binlog
.
FieldIDs
[
i
]
==
fieldID
{
...
...
@@ -637,7 +637,7 @@ func (c *Core) SetDataCoord(ctx context.Context, s types.DataCoord) error {
return
retRows
,
err
}
if
segInfo
.
Status
.
ErrorCode
!=
commonpb
.
ErrorCode_Success
{
return
retRows
,
fmt
.
Errorf
(
"
G
etSegmentInfo from data service failed, error = %s"
,
segInfo
.
Status
.
Reason
)
return
retRows
,
fmt
.
Errorf
(
"
g
etSegmentInfo from data service failed, error = %s"
,
segInfo
.
Status
.
Reason
)
}
if
len
(
segInfo
.
Infos
)
!=
1
{
log
.
Debug
(
"get segment info empty"
)
...
...
@@ -734,7 +734,7 @@ func (c *Core) SetIndexCoord(s types.IndexCoord) error {
return
retID
,
err
}
if
rsp
.
Status
.
ErrorCode
!=
commonpb
.
ErrorCode_Success
{
return
retID
,
fmt
.
Errorf
(
"
B
uildIndex from index service failed, error = %s"
,
rsp
.
Status
.
Reason
)
return
retID
,
fmt
.
Errorf
(
"
b
uildIndex from index service failed, error = %s"
,
rsp
.
Status
.
Reason
)
}
return
rsp
.
IndexBuildID
,
nil
}
...
...
@@ -798,7 +798,7 @@ func (c *Core) SetQueryCoord(s types.QueryCoord) error {
return
err
}
if
rsp
.
ErrorCode
!=
commonpb
.
ErrorCode_Success
{
return
fmt
.
Errorf
(
"
R
eleaseCollection from query service failed, error = %s"
,
rsp
.
Reason
)
return
fmt
.
Errorf
(
"
r
eleaseCollection from query service failed, error = %s"
,
rsp
.
Reason
)
}
return
nil
}
...
...
@@ -825,7 +825,7 @@ func (c *Core) SetQueryCoord(s types.QueryCoord) error {
return
err
}
if
rsp
.
ErrorCode
!=
commonpb
.
ErrorCode_Success
{
return
fmt
.
Errorf
(
"
R
eleasePartitions from query service failed, error = %s"
,
rsp
.
Reason
)
return
fmt
.
Errorf
(
"
r
eleasePartitions from query service failed, error = %s"
,
rsp
.
Reason
)
}
return
nil
}
...
...
@@ -1103,7 +1103,7 @@ func (c *Core) reSendDdMsg(ctx context.Context, force bool) error {
}
invalidateCache
=
true
default
:
return
fmt
.
Errorf
(
"
I
nvalid DdOperation %s"
,
ddOp
.
Type
)
return
fmt
.
Errorf
(
"
i
nvalid DdOperation %s"
,
ddOp
.
Type
)
}
if
invalidateCache
{
...
...
internal/rootcoord/root_coord_test.go
浏览文件 @
173e7b38
...
...
@@ -380,7 +380,7 @@ func createCollectionInMeta(dbName, collName string, core *Core, shardsNum int32
ddCollReq
.
Base
.
Timestamp
=
ts
ddOpStr
,
err
:=
EncodeDdOperation
(
&
ddCollReq
,
CreateCollectionDDType
)
if
err
!=
nil
{
return
fmt
.
Errorf
(
"
E
ncodeDdOperation fail, error = %w"
,
err
)
return
fmt
.
Errorf
(
"
e
ncodeDdOperation fail, error = %w"
,
err
)
}
// use lambda function here to guarantee all resources to be released
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录