From e9303b8568248ffed89b465abce455a6c62f6e4a Mon Sep 17 00:00:00 2001 From: GreatRiver <14086886+LeftHandCold@users.noreply.github.com> Date: Tue, 24 Dec 2024 17:12:47 +0800 Subject: [PATCH] Fix data race for ParallelJobScheduler (#20893) Fix data race for ParallelJobScheduler Approved by: @XuPeng-SH --- pkg/vm/engine/engine_util/tombstone_data_test.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkg/vm/engine/engine_util/tombstone_data_test.go b/pkg/vm/engine/engine_util/tombstone_data_test.go index 6585fea886b1f..28933436d3b5b 100644 --- a/pkg/vm/engine/engine_util/tombstone_data_test.go +++ b/pkg/vm/engine/engine_util/tombstone_data_test.go @@ -17,6 +17,7 @@ package engine_util import ( "bytes" "context" + "github.com/matrixorigin/matrixone/pkg/common/runtime" "testing" "time" @@ -35,9 +36,11 @@ import ( func TestTombstoneData1(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute*5) defer cancel() - - blockio.Start("") - defer blockio.Stop("") + rt := runtime.DefaultRuntime() + name := t.Name() + runtime.SetupServiceBasedRuntime(name, rt) + blockio.Start(name) + defer blockio.Stop(name) proc := testutil.NewProc() @@ -102,7 +105,7 @@ func TestTombstoneData1(t *testing.T) { deleteMask := objectio.GetReusableBitmap() defer deleteMask.Release() - tombstones1.PrefetchTombstones("", fs, nil) + tombstones1.PrefetchTombstones(name, fs, nil) for i := range tombstoneRowIds { sIdx := i / int(stats1.Rows()) if sIdx == 2 {