Skip to content

Commit

Permalink
fix merge sort segment loss data
Browse files Browse the repository at this point in the history
Signed-off-by: aoiasd <[email protected]>
  • Loading branch information
aoiasd committed Nov 4, 2024
1 parent 51cb2fb commit 409edcb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/datanode/compaction/merge_sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ func mergeSortMultipleSegments(ctx context.Context,
deletedRowCount++
continue
}

// Filtering expired entity
if isExpiredEntity(collectionTtl, currentTs, typeutil.Timestamp(v.Timestamp)) {
expiredRowCount++
continue
}
return v, nil
}
}
Expand All @@ -125,12 +131,6 @@ func mergeSortMultipleSegments(ctx context.Context,
smallest := heap.Pop(&pq).(*PQItem)
v := smallest.Value

// Filtering expired entity
if isExpiredEntity(collectionTtl, currentTs, typeutil.Timestamp(v.Timestamp)) {
expiredRowCount++
continue
}

err := mWriter.Write(v)
if err != nil {
log.Warn("compact wrong, failed to writer row", zap.Error(err))
Expand Down

0 comments on commit 409edcb

Please sign in to comment.