mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
Signed-off-by: MrPresent-Han <jamesharden11122@gmail.com>
This commit is contained in:
parent
c82ec0b18a
commit
aba2571fee
@ -683,7 +683,7 @@ func (c *ChannelMeta) getChannelCheckpoint(ttPos *internalpb.MsgPosition) *inter
|
||||
if seg.curInsertBuf != nil && seg.curInsertBuf.startPos != nil && seg.curInsertBuf.startPos.Timestamp < channelCP.Timestamp {
|
||||
channelCP = seg.curInsertBuf.startPos
|
||||
}
|
||||
if seg.curDeleteBuf != nil && seg.curDeleteBuf.startPos != nil && seg.curDeleteBuf.startPos.Timestamp < channelCP.Timestamp {
|
||||
if !seg.isCompactedGenerated && seg.curDeleteBuf != nil && seg.curDeleteBuf.startPos != nil && seg.curDeleteBuf.startPos.Timestamp < channelCP.Timestamp {
|
||||
channelCP = seg.curDeleteBuf.startPos
|
||||
}
|
||||
for _, ib := range seg.historyInsertBuf {
|
||||
|
||||
@ -934,11 +934,12 @@ func (node *DataNode) SyncSegments(ctx context.Context, req *datapb.SyncSegments
|
||||
// oneSegment is definitely in the channel, guaranteed by the check before.
|
||||
collID, partID, _ := channel.getCollectionAndPartitionID(oneSegment)
|
||||
targetSeg := &Segment{
|
||||
collectionID: collID,
|
||||
partitionID: partID,
|
||||
segmentID: req.GetCompactedTo(),
|
||||
numRows: req.GetNumOfRows(),
|
||||
lastSyncTs: tsoutil.GetCurrentTime(),
|
||||
collectionID: collID,
|
||||
partitionID: partID,
|
||||
segmentID: req.GetCompactedTo(),
|
||||
numRows: req.GetNumOfRows(),
|
||||
lastSyncTs: tsoutil.GetCurrentTime(),
|
||||
isCompactedGenerated: true,
|
||||
}
|
||||
|
||||
err = channel.InitPKstats(ctx, targetSeg, req.GetStatsLogs(), tsoutil.GetCurrentTime())
|
||||
|
||||
@ -52,8 +52,9 @@ type Segment struct {
|
||||
currentStat *storage.PkStatistics
|
||||
historyStats []*storage.PkStatistics
|
||||
|
||||
lastSyncTs Timestamp
|
||||
startPos *internalpb.MsgPosition // TODO readonly
|
||||
lastSyncTs Timestamp
|
||||
startPos *internalpb.MsgPosition // TODO readonly
|
||||
isCompactedGenerated bool
|
||||
}
|
||||
|
||||
type addSegmentReq struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user