Revert "fix compacted segment delete buf block channel cp update(#23621)" (#23795)

This reverts commit 9069022fb796ab4c037efbf377c839b8c1cc8f70.

Signed-off-by: MrPresent-Han <jamesharden11122@gmail.com>
This commit is contained in:
MrPresent-Han 2023-04-28 15:12:36 +08:00 committed by GitHub
parent a7c44b29d3
commit c58c35726a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 10 deletions

View File

@ -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.isCompactedGenerated && seg.curDeleteBuf != nil && seg.curDeleteBuf.startPos != nil && seg.curDeleteBuf.startPos.Timestamp < channelCP.Timestamp {
if seg.curDeleteBuf != nil && seg.curDeleteBuf.startPos != nil && seg.curDeleteBuf.startPos.Timestamp < channelCP.Timestamp {
channelCP = seg.curDeleteBuf.startPos
}
for _, ib := range seg.historyInsertBuf {

View File

@ -934,12 +934,11 @@ 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(),
isCompactedGenerated: true,
collectionID: collID,
partitionID: partID,
segmentID: req.GetCompactedTo(),
numRows: req.GetNumOfRows(),
lastSyncTs: tsoutil.GetCurrentTime(),
}
err = channel.InitPKstats(ctx, targetSeg, req.GetStatsLogs(), tsoutil.GetCurrentTime())

View File

@ -52,9 +52,8 @@ type Segment struct {
currentStat *storage.PkStatistics
historyStats []*storage.PkStatistics
lastSyncTs Timestamp
startPos *internalpb.MsgPosition // TODO readonly
isCompactedGenerated bool
lastSyncTs Timestamp
startPos *internalpb.MsgPosition // TODO readonly
}
type addSegmentReq struct {