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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
|
@ -330,11 +331,24 @@ func (t *levelZeroCompactionTask) composeDeltalog(segmentID int64, dData *storag
|
||||||
|
|
||||||
uploadKv[blobPath] = blob.GetValue()
|
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{
|
deltalog := &datapb.Binlog{
|
||||||
|
EntriesNum: dData.RowCount,
|
||||||
LogSize: int64(len(blob.GetValue())),
|
LogSize: int64(len(blob.GetValue())),
|
||||||
LogPath: blobPath,
|
LogPath: blobPath,
|
||||||
LogID: logID,
|
LogID: logID,
|
||||||
|
TimestampFrom: minTs,
|
||||||
|
TimestampTo: maxTs,
|
||||||
}
|
}
|
||||||
|
|
||||||
return uploadKv, deltalog, nil
|
return uploadKv, deltalog, nil
|
||||||
|
|
Loading…
Reference in New Issue