Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
72c5e2a4
M
milvus
项目概览
milvus
/
milvus
11 个月 前同步成功
通知
260
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,体验更适合开发者的 AI 搜索 >>
未验证
提交
72c5e2a4
编写于
6月 21, 2023
作者:
X
Xiaofan
提交者:
GitHub
6月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix channel reassigned to other datanodes (#25015)
Signed-off-by:
N
xiaofan-luan
<
xiaofan.luan@zilliz.com
>
上级
e660cc3f
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
332 addition
and
302 deletion
+332
-302
configs/milvus.yaml
configs/milvus.yaml
+1
-1
internal/datacoord/channel_manager.go
internal/datacoord/channel_manager.go
+1
-0
internal/datacoord/server.go
internal/datacoord/server.go
+5
-0
internal/datacoord/server_test.go
internal/datacoord/server_test.go
+1
-0
internal/datacoord/services.go
internal/datacoord/services.go
+24
-12
internal/datanode/flush_manager.go
internal/datanode/flush_manager.go
+1
-0
internal/proto/data_coord.proto
internal/proto/data_coord.proto
+1
-0
internal/proto/datapb/data_coord.pb.go
internal/proto/datapb/data_coord.pb.go
+298
-289
未找到文件。
configs/milvus.yaml
浏览文件 @
72c5e2a4
...
...
@@ -285,7 +285,7 @@ indexNode:
dataCoord
:
channel
:
watchTimeoutInterval
:
12
0
# Timeout on watching channels (in seconds). Datanode tickler update watch progress will reset timeout timer.
watchTimeoutInterval
:
30
0
# Timeout on watching channels (in seconds). Datanode tickler update watch progress will reset timeout timer.
balanceSilentDuration
:
300
# The duration before the channelBalancer on datacoord to run
balanceInterval
:
360
#The interval for the channelBalancer on datacoord to check balance status
segment
:
...
...
internal/datacoord/channel_manager.go
浏览文件 @
72c5e2a4
...
...
@@ -506,6 +506,7 @@ func (c *ChannelManager) GetBufferChannels() *NodeChannelInfo {
}
// Match checks and returns whether the node ID and channel match.
// use vchannel
func
(
c
*
ChannelManager
)
Match
(
nodeID
int64
,
channel
string
)
bool
{
c
.
mu
.
RLock
()
defer
c
.
mu
.
RUnlock
()
...
...
internal/datacoord/server.go
浏览文件 @
72c5e2a4
...
...
@@ -642,6 +642,11 @@ func (s *Server) handleTimetickMessage(ctx context.Context, ttMsg *msgstream.Dat
// if lag behind, log every 1 mins about
log
.
RatedWarn
(
60.0
,
"time tick lag behind for more than 1 minutes"
,
zap
.
String
(
"channel"
,
ch
),
zap
.
Time
(
"timetick"
,
physical
))
}
// ignore report from a different node
if
!
s
.
cluster
.
channelManager
.
Match
(
ttMsg
.
GetBase
()
.
GetSourceID
(),
ch
)
{
log
.
Warn
(
"node is not matched with channel"
,
zap
.
String
(
"channel"
,
ch
),
zap
.
Int64
(
"nodeID"
,
ttMsg
.
GetBase
()
.
GetSourceID
()))
return
nil
}
sub
:=
tsoutil
.
SubByNow
(
ts
)
pChannelName
:=
funcutil
.
ToPhysicalChannel
(
ch
)
...
...
internal/datacoord/server_test.go
浏览文件 @
72c5e2a4
...
...
@@ -1551,6 +1551,7 @@ func TestSaveBinlogPaths(t *testing.T) {
resp
,
err
:=
svr
.
SaveBinlogPaths
(
context
.
Background
(),
&
datapb
.
SaveBinlogPathsRequest
{
SegmentID
:
1
,
Channel
:
"test"
,
})
assert
.
NoError
(
t
,
err
)
assert
.
Equal
(
t
,
commonpb
.
ErrorCode_MetaFailed
,
resp
.
GetErrorCode
())
...
...
internal/datacoord/services.go
浏览文件 @
72c5e2a4
...
...
@@ -423,8 +423,22 @@ func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPath
zap
.
Any
(
"startPositions"
,
req
.
GetStartPositions
()),
zap
.
Any
(
"checkpoints"
,
req
.
GetCheckPoints
()))
// validate
nodeID
:=
req
.
GetBase
()
.
GetSourceID
()
// virtual channel name
channelName
:=
req
.
Channel
// for compatibility issue , if len(channelName) not exist, skip the check
// No need to check import channel--node matching in data import case.
// Also avoid to handle segment not found error if not the owner of shard
if
!
req
.
GetImporting
()
&&
len
(
channelName
)
!=
0
{
if
!
s
.
channelManager
.
Match
(
nodeID
,
channelName
)
{
failResponse
(
resp
,
fmt
.
Sprintf
(
"channel %s is not watched on node %d"
,
channelName
,
nodeID
))
resp
.
ErrorCode
=
commonpb
.
ErrorCode_MetaFailed
log
.
Warn
(
"node is not matched with channel"
,
zap
.
String
(
"channel"
,
channelName
))
return
resp
,
nil
}
}
// validate
segmentID
:=
req
.
GetSegmentID
()
segment
:=
s
.
meta
.
GetSegment
(
segmentID
)
...
...
@@ -444,17 +458,6 @@ func (s *Server) SaveBinlogPaths(ctx context.Context, req *datapb.SaveBinlogPath
return
resp
,
nil
}
// No need to check import channel--node matching in data import case.
if
!
req
.
GetImporting
()
{
channel
:=
segment
.
GetInsertChannel
()
if
!
s
.
channelManager
.
Match
(
nodeID
,
channel
)
{
failResponse
(
resp
,
fmt
.
Sprintf
(
"channel %s is not watched on node %d"
,
channel
,
nodeID
))
resp
.
ErrorCode
=
commonpb
.
ErrorCode_MetaFailed
log
.
Warn
(
"node is not matched with channel"
,
zap
.
String
(
"channel"
,
channel
))
return
resp
,
nil
}
}
if
req
.
GetDropped
()
{
s
.
segmentManager
.
DropSegment
(
ctx
,
segment
.
GetID
())
}
...
...
@@ -1447,6 +1450,15 @@ func (s *Server) handleRPCTimetickMessage(ctx context.Context, ttMsg *msgpb.Data
ch
:=
ttMsg
.
GetChannelName
()
ts
:=
ttMsg
.
GetTimestamp
()
// ignore to handle RPC Timetick message since it's no longer the leader
if
!
s
.
cluster
.
channelManager
.
Match
(
ttMsg
.
GetBase
()
.
GetSourceID
(),
ch
)
{
log
.
Warn
(
"node is not matched with channel"
,
zap
.
String
(
"channel"
,
ch
),
zap
.
Int64
(
"nodeID"
,
ttMsg
.
GetBase
()
.
GetSourceID
()),
)
return
nil
}
s
.
updateSegmentStatistics
(
ttMsg
.
GetSegmentsStats
())
if
err
:=
s
.
segmentManager
.
ExpireAllocations
(
ch
,
ts
);
err
!=
nil
{
...
...
internal/datanode/flush_manager.go
浏览文件 @
72c5e2a4
...
...
@@ -909,6 +909,7 @@ func flushNotifyFunc(dsService *dataSyncService, opts ...retry.Option) notifyMet
StartPositions
:
startPos
,
Flushed
:
pack
.
flushed
,
Dropped
:
pack
.
dropped
,
Channel
:
dsService
.
vchannelName
,
}
err
:=
retry
.
Do
(
context
.
Background
(),
func
()
error
{
rsp
,
err
:=
dsService
.
dataCoord
.
SaveBinlogPaths
(
context
.
Background
(),
req
)
...
...
internal/proto/data_coord.proto
浏览文件 @
72c5e2a4
...
...
@@ -298,6 +298,7 @@ message SaveBinlogPathsRequest {
repeated
FieldBinlog
deltalogs
=
9
;
bool
dropped
=
10
;
bool
importing
=
11
;
string
channel
=
12
;
// report channel name for verification
}
message
CheckPoint
{
...
...
internal/proto/datapb/data_coord.pb.go
浏览文件 @
72c5e2a4
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录