[skip ci]Add comment in insertbuffernode (#9354)

Signed-off-by: Yang Xuan <xuan.yang@zilliz.com>
This commit is contained in:
XuanYang-cn 2021-10-06 22:20:05 +08:00 committed by GitHub
parent 9b0800c933
commit 65a76b9bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,6 +204,7 @@ func (ibNode *insertBufferNode) Operate(in []Msg) []Msg {
displaySize := min(10, len(seg2Upload))
// Log the segment statistics in mem
for k, segID := range seg2Upload[:displaySize] {
bd, ok := ibNode.insertBuffer.Load(segID)
if !ok {
@ -349,6 +350,9 @@ func (ibNode *insertBufferNode) Operate(in []Msg) []Msg {
return nil
}
// updateSegStatesInReplica updates statistics in replica for the segments in insertMsgs.
// If the segment doesn't exist, a new segment will be created.
// The segment number of rows will be updated in mem, waiting to be uploaded to DataCoord.
func (ibNode *insertBufferNode) updateSegStatesInReplica(insertMsgs []*msgstream.InsertMsg, startPos, endPos *internalpb.MsgPosition) (seg2Upload []UniqueID, err error) {
uniqueSeg := make(map[UniqueID]int64)
for _, msg := range insertMsgs {