mirror of https://github.com/milvus-io/milvus.git
Recover the segmentIDs when fail to send tt (#22771)
Signed-off-by: SimFG <bang.fu@zilliz.com>pull/22784/head
parent
cb96314fe7
commit
bb55200878
|
@ -21,7 +21,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/milvus-io/milvus/internal/log"
|
"github.com/milvus-io/milvus/internal/log"
|
||||||
|
"github.com/samber/lo"
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
|
"golang.org/x/exp/maps"
|
||||||
)
|
)
|
||||||
|
|
||||||
type sendTimeTick func(Timestamp, []int64) error
|
type sendTimeTick func(Timestamp, []int64) error
|
||||||
|
@ -124,6 +126,11 @@ func (mt *mergedTimeTickerSender) work() {
|
||||||
if isDiffTs {
|
if isDiffTs {
|
||||||
if err := mt.send(lastTs, sids); err != nil {
|
if err := mt.send(lastTs, sids); err != nil {
|
||||||
log.Error("send hard time tick failed", zap.Error(err))
|
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…
Reference in New Issue