Skip to content

Commit

Permalink
roachtest: mvcc_gc increase GC waiting timeouts
Browse files Browse the repository at this point in the history
Test waits for mvcc gc queue to collect old data. Replicas are
enqueued for GC asynchronously and it could take long time for
garbage to get collected which causes test to fail.
This commit bumps retry timeout to remove false negatives.

Release note: None

Fixes: #90020
  • Loading branch information
aliher1911 committed Oct 26, 2022
1 parent 1b1c8da commit 52e1859
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/cmd/roachtest/tests/mvcc_gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func runMVCCGC(ctx context.Context, t test.Test, c cluster.Cluster) {

// How many times test repeats generate/cleanup cycles after initial one.
const cleanupRuns = 3
// How long to wait for data to be GCd during assert loop.
const gcRetryTimeout = 7 * time.Minute

c.Put(ctx, t.Cockroach(), "./cockroach")
s := install.MakeClusterSettings()
Expand Down Expand Up @@ -129,7 +131,7 @@ func runMVCCGC(ctx context.Context, t test.Test, c cluster.Cluster) {

t.L().Printf("partially deleted some data using tombstones")

assertRangesWithGCRetry(ctx, t, c, 5*time.Minute, m, func() error {
assertRangesWithGCRetry(ctx, t, c, gcRetryTimeout, m, func() error {
totals, rangeCount := collectTableMVCCStatsOrFatal(t, conn, m)
return checkRangesHaveNoRangeTombstones(totals, rangeCount)
})
Expand All @@ -152,7 +154,7 @@ func runMVCCGC(ctx context.Context, t test.Test, c cluster.Cluster) {
t.Fatal(err)
}

assertRangesWithGCRetry(ctx, t, c, 5*time.Minute, m, func() error {
assertRangesWithGCRetry(ctx, t, c, gcRetryTimeout, m, func() error {
totals, details := collectStatsAndConsistencyOrFail(t, conn, m)
return checkRangesConsistentAndHaveNoData(totals, details)
})
Expand Down

0 comments on commit 52e1859

Please sign in to comment.