mirror of https://github.com/milvus-io/milvus.git
fix: Fill deltalog entry num & time range in L0 compactions (#33004)
Resolves #33003 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com> Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/33008/head
parent
4724779b3b
commit
12ec3d61d9
|
@ -19,6 +19,7 @@ package datanode
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/samber/lo"
|
||||
|
@ -330,11 +331,24 @@ func (t *levelZeroCompactionTask) composeDeltalog(segmentID int64, dData *storag
|
|||
|
||||
uploadKv[blobPath] = blob.GetValue()
|
||||
|
||||
// TODO Timestamp?
|
||||
minTs := uint64(math.MaxUint64)
|
||||
maxTs := uint64(0)
|
||||
for _, ts := range dData.Tss {
|
||||
if ts > maxTs {
|
||||
maxTs = ts
|
||||
}
|
||||
if ts < minTs {
|
||||
minTs = ts
|
||||
}
|
||||
}
|
||||
|
||||
deltalog := &datapb.Binlog{
|
||||
LogSize: int64(len(blob.GetValue())),
|
||||
LogPath: blobPath,
|
||||
LogID: logID,
|
||||
EntriesNum: dData.RowCount,
|
||||
LogSize: int64(len(blob.GetValue())),
|
||||
LogPath: blobPath,
|
||||
LogID: logID,
|
||||
TimestampFrom: minTs,
|
||||
TimestampTo: maxTs,
|
||||
}
|
||||
|
||||
return uploadKv, deltalog, nil
|
||||
|
|
Loading…
Reference in New Issue