-
Notifications
You must be signed in to change notification settings - Fork 2.3k
show vitess_keyspaces should not trip over deleted keyspaces #19055
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
base: main
Are you sure you want to change the base?
Conversation
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19055 +/- ##
=======================================
Coverage 69.90% 69.90%
=======================================
Files 1612 1612
Lines 215817 215821 +4
=======================================
+ Hits 150865 150869 +4
Misses 64952 64952 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
63c178e to
51c8652
Compare
Signed-off-by: Nick Van Wiggeren <[email protected]>
Signed-off-by: Nick Van Wiggeren <[email protected]>
51c8652 to
a0c9b89
Compare
Description
When a keyspace is deleted, SHOW VITESS_SHARDS can fail because the keyspace name is still in the serving graph cache, but fetching its shards returns a topo.NoNode error. The error was being wrapped with vterrors.Errorf which converted it to Code_UNKNOWN, making it indistinguishable from real errors.
This PR changes GetKeyspaceShards to use vterrors.Wrapf instead, preserving the underlying error type. Then in ShowShards, we check for topo.NoNode errors and skip those keyspaces rather than failing the entire query.
Added a unit test to verify deleted keyspaces are handled gracefully.
Related Issue(s)
Closes #19080
Related to #7955
Checklist
Deployment Notes
N/A
AI Disclosure
This PR was written in concert with Claude Code and Opus 4.5 - especially the test generation.