Skip to content

Commit

Permalink
Merge pull request #134976 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-24.3-134751

release-24.3: lease: dump stacks if TestDescriptorRefreshOnRetry fails
  • Loading branch information
rafiss authored Nov 12, 2024
2 parents 4a7cc14 + 17b7159 commit a2408f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/sql/catalog/lease/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ go_test(
"//pkg/testutils/sqlutils",
"//pkg/testutils/testcluster",
"//pkg/util/admission",
"//pkg/util/allstacks",
"//pkg/util/ctxgroup",
"//pkg/util/encoding",
"//pkg/util/hlc",
Expand Down
2 changes: 2 additions & 0 deletions pkg/sql/catalog/lease/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
"github.com/cockroachdb/cockroach/pkg/testutils/testcluster"
"github.com/cockroachdb/cockroach/pkg/util/allstacks"
"github.com/cockroachdb/cockroach/pkg/util/ctxgroup"
"github.com/cockroachdb/cockroach/pkg/util/encoding"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
Expand Down Expand Up @@ -989,6 +990,7 @@ CREATE TABLE t.foo (v INT);
// Descriptor has been acquired one more time than it has been released.
aCount, rCount := atomic.LoadInt32(&fooAcquiredCount), atomic.LoadInt32(&fooReleaseCount)
if aCount != rCount+1 {
t.Logf("\nall stacks:\n\n%s\n", allstacks.Get())
t.Fatalf("invalid descriptor acquisition counts = %d, %d", aCount, rCount)
}

Expand Down

0 comments on commit a2408f7

Please sign in to comment.