Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
609cc243
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,发现更多精彩内容 >>
未验证
提交
609cc243
编写于
10月 13, 2021
作者:
Z
zhenshan.cao
提交者:
GitHub
10月 13, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix golint error in querycoord (#9836)
Signed-off-by:
N
zhenshan.cao
<
zhenshan.cao@zilliz.com
>
上级
3b230b5c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
11 addition
and
11 deletion
+11
-11
internal/querycoord/cluster_test.go
internal/querycoord/cluster_test.go
+2
-2
internal/querycoord/impl.go
internal/querycoord/impl.go
+1
-1
internal/querycoord/meta.go
internal/querycoord/meta.go
+3
-3
internal/querycoord/meta_test.go
internal/querycoord/meta_test.go
+2
-2
internal/querycoord/task.go
internal/querycoord/task.go
+3
-3
未找到文件。
internal/querycoord/cluster_test.go
浏览文件 @
609cc243
...
...
@@ -166,7 +166,7 @@ func TestGrpcRequest(t *testing.T) {
})
t
.
Run
(
"Test AddQueryChannel"
,
func
(
t
*
testing
.
T
)
{
reqChannel
,
resChannel
,
err
:=
cluster
.
clusterMeta
.
G
etQueryChannel
(
defaultCollectionID
)
reqChannel
,
resChannel
,
err
:=
cluster
.
clusterMeta
.
g
etQueryChannel
(
defaultCollectionID
)
assert
.
Nil
(
t
,
err
)
addQueryChannelReq
:=
&
querypb
.
AddQueryChannelRequest
{
NodeID
:
nodeID
,
...
...
@@ -179,7 +179,7 @@ func TestGrpcRequest(t *testing.T) {
})
t
.
Run
(
"Test RemoveQueryChannel"
,
func
(
t
*
testing
.
T
)
{
reqChannel
,
resChannel
,
err
:=
cluster
.
clusterMeta
.
G
etQueryChannel
(
defaultCollectionID
)
reqChannel
,
resChannel
,
err
:=
cluster
.
clusterMeta
.
g
etQueryChannel
(
defaultCollectionID
)
assert
.
Nil
(
t
,
err
)
removeQueryChannelReq
:=
&
querypb
.
RemoveQueryChannelRequest
{
NodeID
:
nodeID
,
...
...
internal/querycoord/impl.go
浏览文件 @
609cc243
...
...
@@ -445,7 +445,7 @@ func (qc *QueryCoord) CreateQueryChannel(ctx context.Context, req *querypb.Creat
}
collectionID
:=
req
.
CollectionID
queryChannel
,
queryResultChannel
,
err
:=
qc
.
meta
.
G
etQueryChannel
(
collectionID
)
queryChannel
,
queryResultChannel
,
err
:=
qc
.
meta
.
g
etQueryChannel
(
collectionID
)
if
err
!=
nil
{
status
.
ErrorCode
=
commonpb
.
ErrorCode_UnexpectedError
status
.
Reason
=
err
.
Error
()
...
...
internal/querycoord/meta.go
浏览文件 @
609cc243
...
...
@@ -63,7 +63,7 @@ type Meta interface {
removeDmChannel
(
collectionID
UniqueID
,
nodeID
int64
,
channels
[]
string
)
error
getQueryChannelInfoByID
(
collectionID
UniqueID
)
(
*
querypb
.
QueryChannelInfo
,
error
)
G
etQueryChannel
(
collectionID
UniqueID
)
(
string
,
string
,
error
)
g
etQueryChannel
(
collectionID
UniqueID
)
(
string
,
string
,
error
)
setLoadType
(
collectionID
UniqueID
,
loadType
querypb
.
LoadType
)
error
getLoadType
(
collectionID
UniqueID
)
(
querypb
.
LoadType
,
error
)
...
...
@@ -578,7 +578,7 @@ func (m *MetaReplica) removeDmChannel(collectionID UniqueID, nodeID int64, chann
return
errors
.
New
(
"addDmChannels: can't find collection in collectionInfos"
)
}
func
(
m
*
MetaReplica
)
G
etQueryChannel
(
collectionID
UniqueID
)
(
string
,
string
,
error
)
{
func
(
m
*
MetaReplica
)
g
etQueryChannel
(
collectionID
UniqueID
)
(
string
,
string
,
error
)
{
m
.
Lock
()
defer
m
.
Unlock
()
...
...
@@ -601,7 +601,7 @@ func (m *MetaReplica) GetQueryChannel(collectionID UniqueID) (string, string, er
}
err
:=
saveQueryChannelInfo
(
collectionID
,
queryChannelInfo
,
m
.
client
)
if
err
!=
nil
{
log
.
Error
(
"
G
etQueryChannel: save channel to etcd error"
,
zap
.
Error
(
err
))
log
.
Error
(
"
g
etQueryChannel: save channel to etcd error"
,
zap
.
Error
(
err
))
return
""
,
""
,
err
}
m
.
queryChannelInfos
[
collectionID
]
=
queryChannelInfo
...
...
internal/querycoord/meta_test.go
浏览文件 @
609cc243
...
...
@@ -232,8 +232,8 @@ func TestMetaFunc(t *testing.T) {
assert
.
Equal
(
t
,
defaultSegmentID
,
infos
[
0
]
.
SegmentID
)
})
t
.
Run
(
"Test
G
etQueryChannel"
,
func
(
t
*
testing
.
T
)
{
reqChannel
,
resChannel
,
err
:=
meta
.
G
etQueryChannel
(
defaultCollectionID
)
t
.
Run
(
"Test
g
etQueryChannel"
,
func
(
t
*
testing
.
T
)
{
reqChannel
,
resChannel
,
err
:=
meta
.
g
etQueryChannel
(
defaultCollectionID
)
assert
.
NotNil
(
t
,
reqChannel
)
assert
.
NotNil
(
t
,
resChannel
)
assert
.
Nil
(
t
,
err
)
...
...
internal/querycoord/task.go
浏览文件 @
609cc243
...
...
@@ -1038,7 +1038,7 @@ func (lst *LoadSegmentTask) Reschedule(ctx context.Context) ([]task, error) {
hasWatchQueryChannel
:=
lst
.
cluster
.
hasWatchedQueryChannel
(
lst
.
ctx
,
nodeID
,
collectionID
)
if
!
hasWatchQueryChannel
{
queryChannel
,
queryResultChannel
,
err
:=
lst
.
meta
.
G
etQueryChannel
(
collectionID
)
queryChannel
,
queryResultChannel
,
err
:=
lst
.
meta
.
g
etQueryChannel
(
collectionID
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -1257,7 +1257,7 @@ func (wdt *WatchDmChannelTask) Reschedule(ctx context.Context) ([]task, error) {
hasWatchQueryChannel
:=
wdt
.
cluster
.
hasWatchedQueryChannel
(
wdt
.
ctx
,
nodeID
,
collectionID
)
if
!
hasWatchQueryChannel
{
queryChannel
,
queryResultChannel
,
err
:=
wdt
.
meta
.
G
etQueryChannel
(
collectionID
)
queryChannel
,
queryResultChannel
,
err
:=
wdt
.
meta
.
g
etQueryChannel
(
collectionID
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -1818,7 +1818,7 @@ func assignInternalTask(ctx context.Context,
for
nodeID
,
watched
:=
range
watchQueryChannelInfo
{
if
!
watched
{
ctx
=
opentracing
.
ContextWithSpan
(
context
.
Background
(),
sp
)
queryChannel
,
queryResultChannel
,
err
:=
meta
.
G
etQueryChannel
(
collectionID
)
queryChannel
,
queryResultChannel
,
err
:=
meta
.
g
etQueryChannel
(
collectionID
)
if
err
!=
nil
{
return
err
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录