Skip to content

Commit

Permalink
update 16
Browse files Browse the repository at this point in the history
  • Loading branch information
XuPeng-SH committed Dec 14, 2024
1 parent 0a82fbe commit 9263993
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions pkg/vm/engine/tae/db/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ func (c *Controller) handleToReplayCmd(cmd *controlCmd) {

// 2.1 remove GC disk cron job. no new GC job will be issued from now on
RemoveCronJob(c.db, CronJobs_Name_GCDisk)
RemoveCronJob(c.db, CronJobs_Name_GCCheckpoint)
if err = c.db.DiskCleaner.SwitchToReplayMode(ctx); err != nil {
// Rollback
return
Expand Down
12 changes: 8 additions & 4 deletions pkg/vm/engine/tae/db/testutil/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,23 @@ func InitTestDBWithDir(
t *testing.T,
opts *options.Options,
) *db.DB {
if db, err := db.Open(ctx, dir, opts); err != nil {
var (
err error
tae *db.DB
)
if tae, err = db.Open(ctx, dir, opts); err != nil {
panic(err)
}
// only ut executes this checker
db.DiskCleaner.GetCleaner().AddChecker(
tae.DiskCleaner.GetCleaner().AddChecker(
func(item any) bool {
min := db.TxnMgr.MinTSForTest()
min := tae.TxnMgr.MinTSForTest()
ckp := item.(*checkpoint.CheckpointEntry)
//logutil.Infof("min: %v, checkpoint: %v", min.ToString(), checkpoint.GetStart().ToString())
end := ckp.GetEnd()
return !end.GE(&min)
}, cmd_util.CheckerKeyMinTS)
return db
return tae
}

func InitTestDB(
Expand Down

0 comments on commit 9263993

Please sign in to comment.