Skip to content

Commit adeeb80

Browse files
authored
Merge branch 'main' into fix_iscp_3
2 parents 846b609 + d4fae74 commit adeeb80

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/vm/engine/tae/db/gc/v3/window.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,15 +383,17 @@ func collectMapData(
383383
if len(objects) == 0 {
384384
return nil
385385
}
386+
rows := 0
386387
for _, tables := range objects {
387388
for _, entry := range tables {
388389
err := addObjectToBatch(bat, entry.stats, entry, mp)
389390
if err != nil {
390391
return err
391392
}
393+
rows++
392394
}
393395
}
394-
batch.SetLength(bat, len(objects))
396+
batch.SetLength(bat, rows)
395397
return nil
396398
}
397399

@@ -448,7 +450,8 @@ func loader(
448450
mp *mpool.MPool,
449451
) error {
450452
for id := uint32(0); id < stats.BlkCnt(); id++ {
451-
stats.ObjectLocation().SetID(uint16(id))
453+
location := stats.ObjectLocation()
454+
location.SetID(uint16(id))
452455
data, _, err := ioutil.LoadOneBlock(cxt, fs, stats.ObjectLocation(), objectio.SchemaData)
453456
if err != nil {
454457
return err

0 commit comments

Comments
 (0)