From 0dd20e520ff303daa0bcd468df4441f412e8b808 Mon Sep 17 00:00:00 2001 From: Wenbin1002 Date: Mon, 1 Jul 2024 14:12:42 +0800 Subject: [PATCH] preallocate transfer page #16953 --- pkg/vm/engine/tae/db/test/db_test.go | 4 ++-- pkg/vm/engine/tae/tables/txnentries/mergeobjects.go | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/vm/engine/tae/db/test/db_test.go b/pkg/vm/engine/tae/db/test/db_test.go index 9409695b1965..563c3741a184 100644 --- a/pkg/vm/engine/tae/db/test/db_test.go +++ b/pkg/vm/engine/tae/db/test/db_test.go @@ -9019,7 +9019,7 @@ func TestPersistTransferTable(t *testing.T) { Pages: make(chan *model.TransferPage, 1000000), } go model.Cleaner.Handler() - page := model.NewTransferHashPage(&id1, now, false, + page := model.NewTransferHashPage(&id1, now, 10, false, model.WithTTL(time.Second), ) ids := make([]types.Rowid, 10) @@ -9104,7 +9104,7 @@ func TestClearPersistTransferTable(t *testing.T) { } go model.Cleaner.Handler() - page := model.NewTransferHashPage(&id1, now, false, + page := model.NewTransferHashPage(&id1, now, 10, false, model.WithTTL(time.Second), model.WithDiskTTL(2*time.Second), ) diff --git a/pkg/vm/engine/tae/tables/txnentries/mergeobjects.go b/pkg/vm/engine/tae/tables/txnentries/mergeobjects.go index 3ac34bad22d7..70e063a547f4 100644 --- a/pkg/vm/engine/tae/tables/txnentries/mergeobjects.go +++ b/pkg/vm/engine/tae/tables/txnentries/mergeobjects.go @@ -149,7 +149,6 @@ func (entry *mergeObjectsEntry) prepareTransferPage() { entry.pageIds = append(entry.pageIds, id) _ = entry.rt.TransferTable.AddPage(page) pages = append(pages, page) - k++ } start = time.Now() var blocks []objectio.BlockObject