mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
Recover the segmentIDs when fail to send tt (#22770)
Signed-off-by: SimFG <bang.fu@zilliz.com>
This commit is contained in:
parent
14ff4485ff
commit
ba6666aed6
@ -21,7 +21,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/milvus-io/milvus/internal/log"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
"golang.org/x/exp/maps"
|
||||
)
|
||||
|
||||
type sendTimeTick func(Timestamp, []int64) error
|
||||
@ -129,6 +131,11 @@ func (mt *mergedTimeTickerSender) work() {
|
||||
if isDiffTs {
|
||||
if err := mt.send(lastTs, sids); err != nil {
|
||||
log.Error("send hard time tick failed", zap.Error(err))
|
||||
mt.mu.Lock()
|
||||
maps.Copy(mt.segmentIDs, lo.SliceToMap(sids, func(t int64) (int64, struct{}) {
|
||||
return t, struct{}{}
|
||||
}))
|
||||
mt.mu.Unlock()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user