{"record":{"id":"fd29c3828e0ddfee","repo":"vitessio/vitess","slug":"getvschema-s-failed-v","errorCode":null,"errorMessage":"GetVSchema(%s) failed: %v","messagePattern":"GetVSchema\\((.+?)\\) failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/vtctl/grpcvtctldserver/server.go","lineNumber":5468,"sourceCode":"\t}\n\n\treturn &response, nil\n}\n\n// ValidateVSchema compares the schema of each primary tablet in \"keyspace/shards...\" to the vschema and errs if there are differences\nfunc (s *VtctldServer) ValidateVSchema(ctx context.Context, req *vtctldatapb.ValidateVSchemaRequest) (resp *vtctldatapb.ValidateVSchemaResponse, err error) {\n\tspan, ctx := trace.NewSpan(ctx, \"VtctldServer.ValidateVSchema\")\n\tdefer span.Finish()\n\n\tdefer panicHandler(&err)\n\tkeyspace := req.Keyspace\n\tshards := req.Shards\n\texcludeTables := req.ExcludeTables\n\tincludeViews := req.IncludeViews\n\n\tvschm, err := s.ts.GetVSchema(ctx, keyspace)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"GetVSchema(%s) failed: %v\", keyspace, err)\n\t\treturn nil, err\n\t}\n\n\tresp = &vtctldatapb.ValidateVSchemaResponse{\n\t\tResults:        []string{},\n\t\tResultsByShard: make(map[string]*vtctldatapb.ValidateShardResponse, len(shards)),\n\t}\n\n\tvar (\n\t\twg sync.WaitGroup\n\t\tm  sync.Mutex\n\t)\n\n\twg.Add(len(shards))\n\n\tfor _, shard := range shards {\n\t\tgo func(shard string) {\n\t\t\tdefer wg.Done()","sourceCodeStart":5450,"sourceCodeEnd":5486,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/vtctl/grpcvtctldserver/server.go#L5450-L5486","documentation":"Returned by the grpcvtctldserver GetVSchema handler when reading the vschema for the given keyspace from the topology fails, wrapping the underlying error.","triggerScenarios":"ValidateVSchema called for a keyspace with no VSchema entry in the topo, or the topo read itself fails.","commonSituations":"Typo in keyspace name; keyspace created but ApplyVSchema never run; topo backend unavailable.","solutions":["Check the keyspace name against vtctldclient GetKeyspaces.","Apply a VSchema: vtctldclient ApplyVSchema --vschema-file vschema.json <keyspace>.","Verify topo connectivity if the keyspace is known to have a VSchema."],"exampleFix":"// before (no vschema yet)\nvtctldclient ValidateVSchema commerce\n// after\nvtctldclient ApplyVSchema --vschema-file vschema.json commerce\nvtctldclient ValidateVSchema commerce","handlingStrategy":"validation","validationCode":"vs, err := ts.GetVSchema(ctx, keyspace); if topo.IsErrType(err, topo.NoNode) { return fmt.Errorf(\"keyspace %s has no VSchema; run ApplyVSchema first\", keyspace) }","typeGuard":null,"tryCatchPattern":"_, err := ts.GetVSchema(ctx, ks); if topo.IsErrType(err, topo.NoNode) { /* apply a default vschema or abort */ }","preventionTips":["Apply a VSchema immediately after creating a keyspace","Validate keyspace spelling against GetKeyspaces","Keep vschema definitions in version control and re-apply after topo rebuilds"],"tags":["vschema","topo","keyspace","vtctld"],"backgroundTag":"vschema-not-found","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}