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

sql: flake in TestExperimentalRelocateNonVoters and TestRelocateNonVoters #95201

Closed
knz opened this issue Jan 13, 2023 · 5 comments · Fixed by #98801
Closed

sql: flake in TestExperimentalRelocateNonVoters and TestRelocateNonVoters #95201

knz opened this issue Jan 13, 2023 · 5 comments · Fixed by #98801
Assignees
Labels
A-multitenancy Related to multi-tenancy branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-multitenant Issues owned by the multi-tenant virtual team

Comments

@knz
Copy link
Contributor

knz commented Jan 13, 2023

Describe the problem

Also: #96343

Found here: https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_BazelExtendedCi/8305842?showRootCauses=false&expandBuildChangesSection=true&expandBuildProblemsSection=true&expandBuildTestsSection=true

See error details below. Maybe this problem exists because of the random insertion of a test tenant?

Error Trace:  /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:88
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:335
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:878
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:309
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:850
          Error:        "\xf0" does not contain "\xbd"
          Test:         TestExperimentalRelocateNonVoters/ALTER_TABLE_x_EXPERIMENTAL_RELOCATE_NONVOTERS
          Messages:     tenant=system query=`ALTER TABLE t EXPERIMENTAL_RELOCATE NONVOTERS VALUES (ARRAY[2], 1);` leaseholder=3 replicas=[1 3 4 5] voting_replicas=[1 3 5] non_voting_replicas=[4] fromReplica=4 toReplica=2 row=0 col=0
    multitenant_admin_function_test.go:88:
          Error Trace:  /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:88
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:335
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:813
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:310
                              /home/roach/.cache/bazel/_bazel_roach/c5a4e7d36696d9cd970af2045211a7df/sandbox/processwrapper-sandbox/4308/execroot/com_github_cockroachdb_cockroach/bazel-out/k8-fastbuild/bin/pkg/sql/sql_test_/sql_test.runfiles/com_github_cockroachdb_cockroach/pkg/sql/multitenant_admin_function_test.go:782
          Error:        "75" does not contain "55"
          Test:         TestRelocateNonVoters/ALTER_RANGE_x_RELOCATE_NONVOTERS
          Messages:     tenant=secondary query=`ALTER RANGE (SELECT min(range_id) FROM [SHOW RANGES FROM TABLE t]) RELOCATE NONVOTERS FROM 3 TO 1;` leaseholder=2 replicas=[2 3 4 5] voting_replicas=[2 4 5] non_voting_replicas=[3] fromReplica=3 toReplica=1 row=0 col=0

Jira issue: CRDB-23398

Epic CRDB-23344

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-multitenancy Related to multi-tenancy T-multitenant Issues owned by the multi-tenant virtual team labels Jan 13, 2023
@adityamaru
Copy link
Contributor

Flaked here too - https://teamcity.cockroachdb.com/viewLog.html?buildId=8564093&buildTypeId=Cockroach_UnitTests_BazelUnitTests

@ecwall can you take a look at this, please? Or we can skip the test while you investigate.

@ajstorm ajstorm added the release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. label Mar 7, 2023
@blathers-crl
Copy link

blathers-crl bot commented Mar 7, 2023

Hi @ajstorm, please add branch-* labels to identify which branch(es) this release-blocker affects.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@ajstorm ajstorm added the branch-master Failures and bugs on the master branch. label Mar 7, 2023
@knz knz added GA-blocker and removed release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Mar 13, 2023
@ecwall
Copy link
Contributor

ecwall commented Mar 13, 2023

I think this is caused by this, but I will need help from KV:

// TODO(aayush): If the AdminChangeReplicas call failed because it found that
// the range was already in the process of being rebalanced, we currently fail
// the statement. We should consider instead force-removing these learners
// when AdminChangeReplicas calls are issued by SQL.

// TODO(aayush): If the `AdminChangeReplicas` call failed because it found that

@ecwall
Copy link
Contributor

ecwall commented Mar 13, 2023

Fixing the rangeIDs not matching by ignoring them.

The other error that occurs randomly is #95252 (comment).

I think this one is related to the comment by aayush.

craig bot pushed a commit that referenced this issue Mar 17, 2023
98617: sql: fix data race in MemberOfWithAdminOption r=rafiss a=andyyang890

This patch fixes a race condition in MemberOfWithAdminOption
by using a fresh transaction within the singleflight call.

Fixes #95642
Fixes #96539

Release note: None

98801: multitenant: unskip multitenant_admin_function_test r=knz a=ecwall

Fixes #95201

This test was flaking because it was verifying exact range start keys
which are non-deterministic.

This was fixed as part of #98483 which allows any value for the range start key
and can now be unskipped.

Release note: None

Co-authored-by: Andy Yang <[email protected]>
Co-authored-by: Evan Wall <[email protected]>
@craig craig bot closed this as completed in ba87df9 Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-multitenancy Related to multi-tenancy branch-master Failures and bugs on the master branch. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. GA-blocker T-multitenant Issues owned by the multi-tenant virtual team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants