Skip to content

Commit

Permalink
Improve some metric
Browse files Browse the repository at this point in the history
Signed-off-by: SimFG <bang.fu@zilliz.com>
  • Loading branch information
SimFG committed Nov 23, 2023
1 parent e346111 commit 9ca2777
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/reader/replicate_channel_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -676,9 +676,6 @@ func (r *replicateChannelHandler) handlePack(pack *msgstream.MsgPack) *msgstream
for _, position := range newPack.EndPositions {
position.ChannelName = pChannel
}
if r.msgPackCallback != nil {
r.msgPackCallback(r.pChannelName, newPack)
}
needTsMsg = needTsMsg || len(newPack.Msgs) == 0
if needTsMsg {
timeTickResult := msgpb.TimeTickMsg{
Expand All @@ -699,6 +696,9 @@ func (r *replicateChannelHandler) handlePack(pack *msgstream.MsgPack) *msgstream
}
newPack.Msgs = append(newPack.Msgs, timeTickMsg)
}
if r.msgPackCallback != nil {
r.msgPackCallback(r.pChannelName, newPack)
}
return newPack
}

Expand Down
1 change: 1 addition & 0 deletions server/cdc_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ func (e *MetaCDC) startReplicateDMLMsg(replicateCtx context.Context, info *meta.
var metaOpPosition *meta.PositionInfo
if msgPack.Msgs != nil && len(msgPack.Msgs) > 0 && msgPack.Msgs[0].Type() != commonpb.MsgType_TimeTick {
metaOpPosition = metaPosition
metrics.APIExecuteCountVec.WithLabelValues(info.TaskID, "ReplicateMessage").Inc()
}
metaTargetPosition := &meta.PositionInfo{
Time: msgTime,
Expand Down

0 comments on commit 9ca2777

Please sign in to comment.