Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [skip e2e] data race in load test #39845

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/integration/replicas/load/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"fmt"
"path"
"strings"
"sync"
"testing"
"time"

Expand Down Expand Up @@ -988,8 +989,11 @@ func (s *LoadTestSuite) TestLoadWithCompact() {
s.releaseCollection(dbName, collName)

stopInsertCh := make(chan struct{}, 1)
wg := &sync.WaitGroup{}
wg.Add(1)
// Start a goroutine to continuously insert data and trigger compaction
go func() {
defer wg.Done()
for {
select {
case <-stopInsertCh:
Expand Down Expand Up @@ -1023,6 +1027,7 @@ func (s *LoadTestSuite) TestLoadWithCompact() {

// Clean up
close(stopInsertCh)
wg.Wait()
s.releaseCollection(dbName, collName)
}

Expand Down
Loading