From 4eba71e57532f72b87f81cede09a9a88997f91fe Mon Sep 17 00:00:00 2001 From: Jackson Owens Date: Fri, 3 Feb 2023 11:55:58 -0500 Subject: [PATCH] replay: explcitly flush when replaying flushes To more closely model the captured workload, explicitly flush the memtable after committing a flush batch. --- replay/replay.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/replay/replay.go b/replay/replay.go index 8c40662a3d..c40241a1ad 100644 --- a/replay/replay.go +++ b/replay/replay.go @@ -537,6 +537,10 @@ func (r *Runner) applyWorkloadSteps(ctx context.Context) error { if err := step.flushBatch.Commit(&pebble.WriteOptions{Sync: false}); err != nil { return err } + _, err := r.d.AsyncFlush() + if err != nil { + return err + } r.stepsApplied <- step case ingestStepKind: if err := r.d.Ingest(step.tablesToIngest); err != nil {