Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
0f620ab1
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,发现更多精彩内容 >>
提交
0f620ab1
编写于
2月 05, 2021
作者:
G
godchen
提交者:
yefu.chen
2月 05, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix invalidate metacache error
Signed-off-by:
N
godchen
<
qingxiang.chen@zilliz.com
>
上级
e3842228
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
25 addition
and
21 deletion
+25
-21
internal/distributed/proxyservice/client/client.go
internal/distributed/proxyservice/client/client.go
+1
-2
internal/masterservice/master_service.go
internal/masterservice/master_service.go
+1
-1
internal/proxynode/insert_channels.go
internal/proxynode/insert_channels.go
+2
-4
internal/proxynode/meta_cache.go
internal/proxynode/meta_cache.go
+3
-0
internal/proxyservice/impl.go
internal/proxyservice/impl.go
+9
-3
internal/proxyservice/nodeid_allocator.go
internal/proxyservice/nodeid_allocator.go
+2
-2
internal/proxyservice/task.go
internal/proxyservice/task.go
+5
-7
internal/proxyservice/timesync.go
internal/proxyservice/timesync.go
+2
-2
未找到文件。
internal/distributed/proxyservice/client/client.go
浏览文件 @
0f620ab1
...
...
@@ -49,8 +49,7 @@ func (c *Client) RegisterNode(request *proxypb.RegisterNodeRequest) (*proxypb.Re
}
func
(
c
*
Client
)
InvalidateCollectionMetaCache
(
request
*
proxypb
.
InvalidateCollMetaCacheRequest
)
(
*
commonpb
.
Status
,
error
)
{
_
,
err
:=
c
.
proxyServiceClient
.
InvalidateCollectionMetaCache
(
c
.
ctx
,
request
)
return
nil
,
err
return
c
.
proxyServiceClient
.
InvalidateCollectionMetaCache
(
c
.
ctx
,
request
)
}
func
(
c
*
Client
)
GetTimeTickChannel
()
(
*
milvuspb
.
StringResponse
,
error
)
{
...
...
internal/masterservice/master_service.go
浏览文件 @
0f620ab1
...
...
@@ -839,7 +839,7 @@ func (c *Core) DropCollection(in *milvuspb.DropCollectionRequest) (*commonpb.Sta
if
err
!=
nil
{
return
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UNEXPECTED_ERROR
,
Reason
:
"
Create
collection failed: "
+
err
.
Error
(),
Reason
:
"
Drop
collection failed: "
+
err
.
Error
(),
},
nil
}
return
&
commonpb
.
Status
{
...
...
internal/proxynode/insert_channels.go
浏览文件 @
0f620ab1
...
...
@@ -177,10 +177,8 @@ func (m *InsertChannelsMap) closeAllMsgStream() {
m
.
mtx
.
Lock
()
defer
m
.
mtx
.
Unlock
()
for
loc
,
stream
:=
range
m
.
insertMsgStreams
{
if
m
.
droppedBitMap
[
loc
]
==
0
&&
m
.
usageHistogram
[
loc
]
>=
1
{
stream
.
Close
()
}
for
_
,
stream
:=
range
m
.
insertMsgStreams
{
stream
.
Close
()
}
m
.
collectionID2InsertChannels
=
make
(
map
[
UniqueID
]
int
)
...
...
internal/proxynode/meta_cache.go
浏览文件 @
0f620ab1
...
...
@@ -188,6 +188,9 @@ func (m *MetaCache) GetPartitionID(collectionName string, partitionName string)
}
}
partInfo
:=
m
.
collInfo
[
collectionName
]
.
partInfo
if
partInfo
==
nil
{
partInfo
=
map
[
string
]
typeutil
.
UniqueID
{}
}
for
i
:=
0
;
i
<
len
(
partitions
.
PartitionIDs
);
i
++
{
_
,
ok
:=
partInfo
[
partitions
.
PartitionNames
[
i
]]
...
...
internal/proxyservice/impl.go
浏览文件 @
0f620ab1
...
...
@@ -280,13 +280,19 @@ func (s *ServiceImpl) InvalidateCollectionMetaCache(request *proxypb.InvalidateC
err
=
s
.
sched
.
InvalidateCollectionMetaCacheTaskQueue
.
Enqueue
(
t
)
if
err
!=
nil
{
return
nil
,
err
return
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UNEXPECTED_ERROR
,
Reason
:
err
.
Error
(),
},
nil
}
err
=
t
.
WaitToFinish
()
if
err
!=
nil
{
return
nil
,
err
return
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_UNEXPECTED_ERROR
,
Reason
:
err
.
Error
(),
},
nil
}
return
nil
,
nil
return
t
.
response
,
nil
}
internal/proxyservice/nodeid_allocator.go
浏览文件 @
0f620ab1
...
...
@@ -24,7 +24,7 @@ type NaiveNodeIDAllocatorImpl struct {
func
(
allocator
*
NaiveNodeIDAllocatorImpl
)
AllocOne
()
UniqueID
{
allocator
.
mtx
.
Lock
()
defer
func
()
{
//
allocator.now++
allocator
.
now
++
allocator
.
mtx
.
Unlock
()
}()
return
allocator
.
now
...
...
@@ -32,6 +32,6 @@ func (allocator *NaiveNodeIDAllocatorImpl) AllocOne() UniqueID {
func
NewNodeIDAllocator
()
NodeIDAllocator
{
return
&
NaiveNodeIDAllocatorImpl
{
now
:
1
,
now
:
0
,
}
}
internal/proxyservice/task.go
浏览文件 @
0f620ab1
...
...
@@ -2,17 +2,12 @@ package proxyservice
import
(
"context"
"fmt"
"github.com/zilliztech/milvus-distributed/internal/errors"
"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb2"
"github.com/zilliztech/milvus-distributed/internal/proto/milvuspb"
"github.com/zilliztech/milvus-distributed/internal/proto/proxypb"
"github.com/zilliztech/milvus-distributed/internal/errors"
)
type
TaskEnum
=
int
...
...
@@ -73,7 +68,6 @@ func (t *RegisterLinkTask) PreExecute() error {
func
(
t
*
RegisterLinkTask
)
Execute
()
error
{
info
,
err
:=
t
.
nodeInfos
.
Pick
()
fmt
.
Println
(
"info: "
,
info
)
if
err
!=
nil
{
return
err
}
...
...
@@ -135,6 +129,7 @@ func (t *RegisterNodeTask) PostExecute() error {
type
InvalidateCollectionMetaCacheTask
struct
{
Condition
request
*
proxypb
.
InvalidateCollMetaCacheRequest
response
*
commonpb
.
Status
nodeInfos
*
GlobalNodeInfoTable
}
...
...
@@ -157,6 +152,9 @@ func (t *InvalidateCollectionMetaCacheTask) Execute() error {
return
errors
.
New
(
status
.
Reason
)
}
}
t
.
response
=
&
commonpb
.
Status
{
ErrorCode
:
commonpb
.
ErrorCode_SUCCESS
,
}
return
nil
}
...
...
internal/proxyservice/timesync.go
浏览文件 @
0f620ab1
...
...
@@ -83,8 +83,8 @@ func (ttBarrier *softTimeTickBarrier) Start() error {
case
ttmsgs
:=
<-
ttBarrier
.
ttStream
.
Chan
()
:
//log.Println("ttmsgs: ", ttmsgs)
ttBarrier
.
peerMtx
.
RLock
()
//
log.Println("peer2LastTt map: ", ttBarrier.peer2LastTt)
//
log.Println("len(ttmsgs.Msgs): ", len(ttmsgs.Msgs))
log
.
Println
(
"peer2LastTt map: "
,
ttBarrier
.
peer2LastTt
)
log
.
Println
(
"len(ttmsgs.Msgs): "
,
len
(
ttmsgs
.
Msgs
))
if
len
(
ttmsgs
.
Msgs
)
>
0
{
for
_
,
timetickmsg
:=
range
ttmsgs
.
Msgs
{
ttmsg
:=
timetickmsg
.
(
*
ms
.
TimeTickMsg
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录