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

roachtest: replicate/wide failed #92915

Closed
cockroach-teamcity opened this issue Dec 2, 2022 · 8 comments · Fixed by #93127
Closed

roachtest: replicate/wide failed #92915

cockroach-teamcity opened this issue Dec 2, 2022 · 8 comments · Fixed by #93127
Assignees
Labels
A-multitenancy Related to multi-tenancy branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Milestone

Comments

@cockroach-teamcity
Copy link
Member

cockroach-teamcity commented Dec 2, 2022

roachtest.replicate/wide failed with artifacts on master @ e7b15ebaed9c14668ade0a7827a5525aedef1ab0:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

/cc @cockroachdb/kv-triage

This test on roachdash | Improve this report!

Jira issue: CRDB-22048

Epic CRDB-16746

@cockroach-teamcity cockroach-teamcity added branch-master Failures and bugs on the master branch. C-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. labels Dec 2, 2022
@cockroach-teamcity cockroach-teamcity added this to the 23.1 milestone Dec 2, 2022
@blathers-crl blathers-crl bot added the T-kv KV Team label Dec 2, 2022
@cockroach-teamcity
Copy link
Member Author

roachtest.replicate/wide failed with artifacts on master @ 9c21578450e395c83a1dc0df7090296fef06e006:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

@aliher1911
Copy link
Contributor

aliher1911 commented Dec 5, 2022

Looks like either a flake because we don't handle transient restart errors or some underlying behaviour change.

Test fails because query for unavailable ranges fails after cluster is restarted with 6 nodes out of 9:

if err := db.QueryRow(query).Scan(&unavailable, &underReplicated); err != nil {

N7 is the node removed from a cluster.

@cockroach-teamcity
Copy link
Member Author

roachtest.replicate/wide failed with artifacts on master @ 8a5cb5109d6b7e122e996a44f940bfd61698cd81:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

@aliher1911
Copy link
Contributor

aliher1911 commented Dec 5, 2022

Seem broken by #92787
@arulajmani you reviewed that PR, any thoughts?

@arulajmani
Copy link
Collaborator

arulajmani commented Dec 6, 2022

That PR effectively reverts the changes made in #92293 to introduce a new end-point, instead of using Gossip for NodeDescriptors.

Looking at crdb_internal.go before #92293, we constructed a node locality map as such:

// Map node descriptors to localities
descriptors, err := getAllNodeDescriptors(p)
if err != nil {
return nil, nil, err
}
nodeIDToLocality := make(map[roachpb.NodeID]roachpb.Locality)
for _, desc := range descriptors {
nodeIDToLocality[desc.NodeID] = desc.Locality
}

Note that getAllNodeDescriptors also gets descriptors through gossip, so the change in #92787 to use GetNodeDescriptor continues to use the same source.

However, it seems like we inadvertently changed the behaviour around here:

replicaLocality := nodeIDToLocality[replica.NodeID].String()
if err := replicaLocalityArr.Append(tree.NewDString(replicaLocality)); err != nil {
return nil, err
}

Before these two PRs went in, we would include an empty locality if the node descriptor wasn't found in Gossip, as there wouldn't be an entry in the nodeIDToLocality map. In #92787 we inadvertently started erroring out if we couldn't find the descriptor in Gossip.

It should be easy enough to bring back the old behaviour. cc @ecwall, assigning this to you given you authored the 2 patches linked above. I think all we need to do here is swallow the error from GetNodeDescriptor and use an empty string as the locality.


One thing that isn't clear to me is why we're not able to retrieve this descriptor from Gossip, given our TTL of 2 hours. Might be worth trying to understand this a bit more.

@exalate-issue-sync exalate-issue-sync bot added T-sql-queries SQL Queries Team and removed T-kv KV Team labels Dec 6, 2022
@cockroach-teamcity
Copy link
Member Author

roachtest.replicate/wide failed with artifacts on master @ 146556e19f5e4fdc8c3e6a623b280cc33aee4d18:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

@blathers-crl blathers-crl bot added the T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions) label Dec 6, 2022
@exalate-issue-sync exalate-issue-sync bot removed the T-sql-queries SQL Queries Team label Dec 6, 2022
@ecwall ecwall added the A-multitenancy Related to multi-tenancy label Dec 6, 2022
@cockroach-teamcity
Copy link
Member Author

roachtest.replicate/wide failed with artifacts on master @ 8165e3974c10e88b6ae11c6255872ea16f3a67e3:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

@cockroach-teamcity
Copy link
Member Author

roachtest.replicate/wide failed with artifacts on master @ ec095bc2fdbe4e518b076db20e4920fab67222bf:

test artifacts and logs in: /artifacts/replicate/wide/run_1
(test_impl.go:291).Fatal: pq: unable to look up descriptor for n7

Parameters: ROACHTEST_cloud=gce , ROACHTEST_cpu=1 , ROACHTEST_encrypted=false , ROACHTEST_fs=ext4 , ROACHTEST_localSSD=true , ROACHTEST_ssd=0

Help

See: roachtest README

See: How To Investigate (internal)

This test on roachdash | Improve this report!

craig bot pushed a commit that referenced this issue Dec 8, 2022
93127: multitenant: handle missing NodeDescriptor in crdb_internal.ranges_no_leases r=arulajmani a=ecwall

Fixes #92915

This change matches the previous behavior of using "" for locality if the NodeDescriptor is not found instead of returning an error when generating crdb_internal.ranges_no_leases.

Release note: None

Co-authored-by: Evan Wall <wall@cockroachlabs.com>
@craig craig bot closed this as completed in c9f9198 Dec 8, 2022
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-test-failure Broken test (automatically or manually discovered). O-roachtest O-robot Originated from a bot. release-blocker Indicates a release-blocker. Use with branch-release-2x.x label to denote which branch is blocked. T-sql-foundations SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants